/* Copyright (c) 2014-2018, Linaro Limited
 * All rights reserved.
 *
 * SPDX-License-Identifier:	BSD-3-Clause
 */

#ifndef _ODP_TEST_CRYPTO_VECTORS_H_
#define _ODP_TEST_CRYPTO_VECTORS_H_

#include "test_vectors_len.h"

typedef struct crypto_test_reference_s {
	uint32_t cipher_key_length;
	uint8_t cipher_key[MAX_KEY_LEN];
	uint32_t auth_key_length;
	uint8_t auth_key[MAX_KEY_LEN];
	uint32_t cipher_iv_length;
	uint8_t cipher_iv[MAX_IV_LEN];
	uint32_t auth_iv_length;
	uint8_t auth_iv[MAX_IV_LEN];
	uint32_t length;
	uint8_t plaintext[MAX_DATA_LEN];
	uint8_t ciphertext[MAX_DATA_LEN];
	uint32_t aad_length;
	uint8_t aad[MAX_AAD_LEN];
	uint32_t digest_length;
	uint8_t digest[MAX_DIGEST_LEN];
} crypto_test_reference_t;

static crypto_test_reference_t null_reference[] = {
	{
		.length = 8,
		.plaintext = { 0x32, 0x6a, 0x49, 0x4c, 0xd3, 0x3f, 0xe7, 0x56 },
		.ciphertext = { 0x32, 0x6a, 0x49, 0x4c, 0xd3, 0x3f, 0xe7, 0x56 }
	},
	{
		.length = 16,
		.plaintext = { 0x84, 0x40, 0x1f, 0x78, 0xfe, 0x6c, 0x10, 0x87,
			       0x6d, 0x8e, 0xa2, 0x30, 0x94, 0xea, 0x53, 0x09 },
		.ciphertext = { 0x84, 0x40, 0x1f, 0x78, 0xfe, 0x6c, 0x10, 0x87,
			       0x6d, 0x8e, 0xa2, 0x30, 0x94, 0xea, 0x53, 0x09 }
	}
};

/* TDES-CBC reference vectors, according to
 * "http://csrc.nist.gov/groups/STM/cavp/documents/des/DESMMT.pdf"
 */
static crypto_test_reference_t tdes_cbc_reference[] = {
	{
		.cipher_key_length = TDES_CBC_KEY_LEN,
		.cipher_key = { 0x62, 0x7f, 0x46, 0x0e, 0x08, 0x10, 0x4a, 0x10,
				0x43, 0xcd, 0x26, 0x5d, 0x58, 0x40, 0xea, 0xf1,
				0x31, 0x3e, 0xdf, 0x97, 0xdf, 0x2a, 0x8a, 0x8c},
		.cipher_iv_length = TDES_CBC_IV_LEN,
		.cipher_iv = { 0x8e, 0x29, 0xf7, 0x5e, 0xa7, 0x7e, 0x54, 0x75 },
		.length = 8,
		.plaintext = { 0x32, 0x6a, 0x49, 0x4c, 0xd3, 0x3f, 0xe7, 0x56 },
		.ciphertext = { 0xb2, 0x2b, 0x8d, 0x66, 0xde, 0x97, 0x06, 0x92 }
	},
	{
		.cipher_key_length = TDES_CBC_KEY_LEN,
		.cipher_key = { 0x37, 0xae, 0x5e, 0xbf, 0x46, 0xdf, 0xf2, 0xdc,
				0x07, 0x54, 0xb9, 0x4f, 0x31, 0xcb, 0xb3, 0x85,
				0x5e, 0x7f, 0xd3, 0x6d, 0xc8, 0x70, 0xbf, 0xae},
		.cipher_iv_length = TDES_CBC_IV_LEN,
		.cipher_iv = {0x3d, 0x1d, 0xe3, 0xcc, 0x13, 0x2e, 0x3b, 0x65 },
		.length = 16,
		.plaintext = { 0x84, 0x40, 0x1f, 0x78, 0xfe, 0x6c, 0x10, 0x87,
			       0x6d, 0x8e, 0xa2, 0x30, 0x94, 0xea, 0x53, 0x09 },
		.ciphertext = { 0x7b, 0x1f, 0x7c, 0x7e, 0x3b, 0x1c, 0x94, 0x8e,
				0xbd, 0x04, 0xa7, 0x5f, 0xfb, 0xa7, 0xd2, 0xf5 }
	}
};

/*
 * TDES-ECB reference vectors, according to
 * CAVS 18.0 TECBMMT
 */
static crypto_test_reference_t tdes_ecb_reference[] = {
	/* CAVS 18.0 TECBMMT2.rsp #0 */
	{
		.cipher_key_length = TDES_ECB_KEY_LEN,
		.cipher_key = { 0x15, 0x1f, 0x10, 0x38, 0x3d, 0x6d, 0x19, 0x9b,
				0x4a, 0x76, 0x3b, 0xd5, 0x4a, 0x46, 0xa4, 0x45,
				0x15, 0x1f, 0x10, 0x38, 0x3d, 0x6d, 0x19, 0x9b},
		.length = 8,
		.plaintext = { 0xd8, 0xda, 0x89, 0x29, 0x88, 0x78, 0xed, 0x7d },
		.ciphertext = { 0x89, 0x32, 0x1b, 0xa7, 0x5b, 0xa5, 0x45, 0xdb }
	},
	/* CAVS 18.0 TECBMMT2.rsp #2 */
	{
		.cipher_key_length = TDES_ECB_KEY_LEN,
		.cipher_key = { 0xcd, 0x3d, 0x9b, 0xf7, 0x2f, 0x8c, 0x8a, 0xb5,
				0xfe, 0xe6, 0x73, 0x34, 0x31, 0x1c, 0xa4, 0x62,
				0xcd, 0x3d, 0x9b, 0xf7, 0x2f, 0x8c, 0x8a, 0xb5},
		.length = 24,
		.plaintext = { 0x2f, 0x2a, 0x36, 0x1c, 0x8e, 0x14, 0x5d, 0xc0,
			       0xa7, 0x4a, 0x1b, 0xdb, 0x7c, 0xa9, 0x29, 0xc3,
			       0x38, 0x14, 0x4d, 0x89, 0x13, 0x5b, 0x50, 0xa7 },
		.ciphertext = { 0x7f, 0x1f, 0xd3, 0x2b, 0x36, 0x90, 0x05, 0x4b,
				0xfa, 0x1b, 0x17, 0x35, 0x15, 0x79, 0x33, 0x80,
				0x99, 0xff, 0xa8, 0x4f, 0xea, 0x16, 0x8c, 0x6b }
	}
};

static crypto_test_reference_t aes_cbc_reference[] = {
	{
		.cipher_key_length = AES128_KEY_LEN,
		.cipher_key = { 0x06, 0xa9, 0x21, 0x40, 0x36, 0xb8, 0xa1, 0x5b,
				0x51, 0x2e, 0x03, 0xd5, 0x34, 0x12, 0x00, 0x06},
		.cipher_iv_length = AES_CBC_IV_LEN,
		.cipher_iv = { 0x3d, 0xaf, 0xba, 0x42, 0x9d, 0x9e, 0xb4, 0x30,
			       0xb4, 0x22, 0xda, 0x80, 0x2c, 0x9f, 0xac, 0x41 },
		.length = 16,
		.plaintext = "Single block msg",
		.ciphertext = { 0xe3, 0x53, 0x77, 0x9c, 0x10, 0x79, 0xae, 0xb8,
				0x27, 0x08, 0x94, 0x2d, 0xbe, 0x77, 0x18, 0x1a }
	},
	{
		.cipher_key_length = AES128_KEY_LEN,
		.cipher_key = { 0xc2, 0x86, 0x69, 0x6d, 0x88, 0x7c, 0x9a, 0xa0,
				0x61, 0x1b, 0xbb, 0x3e, 0x20, 0x25, 0xa4, 0x5a},
		.cipher_iv_length = AES_CBC_IV_LEN,
		.cipher_iv = { 0x56, 0x2e, 0x17, 0x99, 0x6d, 0x09, 0x3d, 0x28,
			       0xdd, 0xb3, 0xba, 0x69, 0x5a, 0x2e, 0x6f, 0x58 },
		.length = 32,
		.plaintext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			       0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
			       0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
			       0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f },
		.ciphertext = { 0xd2, 0x96, 0xcd, 0x94, 0xc2, 0xcc, 0xcf, 0x8a,
				0x3a, 0x86, 0x30, 0x28, 0xb5, 0xe1, 0xdc, 0x0a,
				0x75, 0x86, 0x60, 0x2d, 0x25, 0x3c, 0xff, 0xf9,
				0x1b, 0x82, 0x66, 0xbe, 0xa6, 0xd6, 0x1a, 0xb1 }
	},
	{
		.cipher_key_length = AES128_KEY_LEN,
		.cipher_key = { 0x6c, 0x3e, 0xa0, 0x47, 0x76, 0x30, 0xce, 0x21,
				0xa2, 0xce, 0x33, 0x4a, 0xa7, 0x46, 0xc2, 0xcd},
		.cipher_iv_length = AES_CBC_IV_LEN,
		.cipher_iv = { 0xc7, 0x82, 0xdc, 0x4c, 0x09, 0x8c, 0x66, 0xcb,
			       0xd9, 0xcd, 0x27, 0xd8, 0x25, 0x68, 0x2c, 0x81 },
		.length = 48,
		.plaintext = "This is a 48-byte message (exactly 3 AES blocks)",
		.ciphertext = { 0xd0, 0xa0, 0x2b, 0x38, 0x36, 0x45, 0x17, 0x53,
				0xd4, 0x93, 0x66, 0x5d, 0x33, 0xf0, 0xe8, 0x86,
				0x2d, 0xea, 0x54, 0xcd, 0xb2, 0x93, 0xab, 0xc7,
				0x50, 0x69, 0x39, 0x27, 0x67, 0x72, 0xf8, 0xd5,
				0x02, 0x1c, 0x19, 0x21, 0x6b, 0xad, 0x52, 0x5c,
				0x85, 0x79, 0x69, 0x5d, 0x83, 0xba, 0x26, 0x84 }
	},
	{
		.cipher_key_length = AES128_KEY_LEN,
		.cipher_key = { 0x56, 0xe4, 0x7a, 0x38, 0xc5, 0x59, 0x89, 0x74,
				0xbc, 0x46, 0x90, 0x3d, 0xba, 0x29, 0x03, 0x49},
		.cipher_iv_length = AES_CBC_IV_LEN,
		.cipher_iv = { 0x8c, 0xe8, 0x2e, 0xef, 0xbe, 0xa0, 0xda, 0x3c,
			       0x44, 0x69, 0x9e, 0xd7, 0xdb, 0x51, 0xb7, 0xd9 },
		.length = 64,
		.plaintext = { 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
			       0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
			       0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
			       0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
			       0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
			       0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
			       0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
			       0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf },
		.ciphertext = { 0xc3, 0x0e, 0x32, 0xff, 0xed, 0xc0, 0x77, 0x4e,
				0x6a, 0xff, 0x6a, 0xf0, 0x86, 0x9f, 0x71, 0xaa,
				0x0f, 0x3a, 0xf0, 0x7a, 0x9a, 0x31, 0xa9, 0xc6,
				0x84, 0xdb, 0x20, 0x7e, 0xb0, 0xef, 0x8e, 0x4e,
				0x35, 0x90, 0x7a, 0xa6, 0x32, 0xc3, 0xff, 0xdf,
				0x86, 0x8b, 0xb7, 0xb2, 0x9d, 0x3d, 0x46, 0xad,
				0x83, 0xce, 0x9f, 0x9a, 0x10, 0x2e, 0xe9, 0x9d,
				0x49, 0xa5, 0x3e, 0x87, 0xf4, 0xc3, 0xda, 0x55 }
	},
	{
		.cipher_key_length = AES192_KEY_LEN,
		.cipher_key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
				0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
				0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c},
		.cipher_iv_length = AES_CBC_IV_LEN,
		.cipher_iv = { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad,
			       0xde, 0xca, 0xf8, 0x88, 0x01, 0x23, 0x45, 0x67 },
		.length = 32,
		.plaintext = { 0x45, 0x00, 0x00, 0x28, 0xa4, 0xad, 0x40, 0x00,
			       0x40, 0x06, 0x78, 0x80, 0x0a, 0x01, 0x03, 0x8f,
			       0x0a, 0x01, 0x06, 0x12, 0x80, 0x23, 0x06, 0xb8,
			       0xcb, 0x71, 0x26, 0x02, 0xdd, 0x6b, 0xb0, 0x3e },
		.ciphertext = { 0x0d, 0xbe, 0x02, 0xda, 0x68, 0x9c, 0x8f, 0x30,
				0xce, 0x7c, 0x91, 0x7d, 0x41, 0x08, 0xf6, 0xf1,
				0x8e, 0x0d, 0x7f, 0x02, 0xb6, 0x80, 0x9a, 0x2d,
				0x53, 0x1c, 0xc6, 0x98, 0x85, 0xc3, 0x00, 0xe6},
	},
	/* NIST Special Publication 800-38A */
	{
		.cipher_key_length = AES192_KEY_LEN,
		.cipher_key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
				0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
				0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b},
		.cipher_iv_length = AES_CBC_IV_LEN,
		.cipher_iv = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			       0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
		.length = 64,
		.plaintext = { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
			       0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
			       0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
			       0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
			       0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef,
			       0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
			       0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 },
		.ciphertext = { 0x4f, 0x02, 0x1d, 0xb2, 0x43, 0xbc, 0x63, 0x3d,
				0x71, 0x78, 0x18, 0x3a, 0x9f, 0xa0, 0x71, 0xe8,
				0xb4, 0xd9, 0xad, 0xa9, 0xad, 0x7d, 0xed, 0xf4,
				0xe5, 0xe7, 0x38, 0x76, 0x3f, 0x69, 0x14, 0x5a,
				0x57, 0x1b, 0x24, 0x20, 0x12, 0xfb, 0x7a, 0xe0,
				0x7f, 0xa9, 0xba, 0xac, 0x3d, 0xf1, 0x02, 0xe0,
				0x08, 0xb0, 0xe2, 0x79, 0x88, 0x59, 0x88, 0x81,
				0xd9, 0x20, 0xa9, 0xe6, 0x4f, 0x56, 0x15, 0xcd }
	},
	{
		.cipher_key_length = AES256_KEY_LEN,
		.cipher_key = { 0xab, 0xbc, 0xcd, 0xde, 0xf0, 0x01, 0x12, 0x23,
				0x34, 0x45, 0x56, 0x67, 0x78, 0x89, 0x9a, 0xab,
				0xab, 0xbc, 0xcd, 0xde, 0xf0, 0x01, 0x12, 0x23,
				0x34, 0x45, 0x56, 0x67, 0x78, 0x89, 0x9a, 0xab},
		.cipher_iv_length = AES_CBC_IV_LEN,
		.cipher_iv = { 0x11, 0x22, 0x33, 0x44, 0x01, 0x02, 0x03, 0x04,
			       0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c },
		.length = 48,
		.plaintext = { 0x45, 0x00, 0x00, 0x30, 0x69, 0xa6, 0x40, 0x00,
			       0x80, 0x06, 0x26, 0x90, 0xc0, 0xa8, 0x01, 0x02,
			       0x93, 0x89, 0x15, 0x5e, 0x0a, 0x9e, 0x00, 0x8b,
			       0x2d, 0xc5, 0x7e, 0xe0, 0x00, 0x00, 0x00, 0x00,
			       0x70, 0x02, 0x40, 0x00, 0x20, 0xbf, 0x00, 0x00,
			       0x02, 0x04, 0x05, 0xb4, 0x01, 0x01, 0x04, 0x02 },
		.ciphertext = { 0x92, 0x1e, 0x2f, 0x37, 0x36, 0x3c, 0x45, 0xda,
				0xc9, 0x58, 0xb7, 0x07, 0x06, 0x56, 0x54, 0xc5,
				0x93, 0x46, 0x90, 0xb8, 0xcf, 0x0d, 0x4f, 0x79,
				0xf1, 0x32, 0xc2, 0xf7, 0x23, 0xb8, 0x83, 0x09,
				0xbc, 0x37, 0x1c, 0xeb, 0x95, 0x2c, 0x42, 0x7b,
				0x39, 0x10, 0xa8, 0x76, 0xfa, 0xbe, 0x91, 0xe9},
	},
	/* NIST Special Publication 800-38A */
	{
		.cipher_key_length = AES256_KEY_LEN,
		.cipher_key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
				0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
				0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7,
				0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4},
		.cipher_iv_length = AES_CBC_IV_LEN,
		.cipher_iv = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			       0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
		.length = 64,
		.plaintext = { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
			       0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
			       0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
			       0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
			       0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef,
			       0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
			       0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 },
		.ciphertext = { 0xf5, 0x8c, 0x4c, 0x04, 0xd6, 0xe5, 0xf1, 0xba,
				0x77, 0x9e, 0xab, 0xfb, 0x5f, 0x7b, 0xfb, 0xd6,
				0x9c, 0xfc, 0x4e, 0x96, 0x7e, 0xdb, 0x80, 0x8d,
				0x67, 0x9f, 0x77, 0x7b, 0xc6, 0x70, 0x2c, 0x7d,
				0x39, 0xf2, 0x33, 0x69, 0xa9, 0xd9, 0xba, 0xcf,
				0xa5, 0x30, 0xe2, 0x63, 0x04, 0x23, 0x14, 0x61,
				0xb2, 0xeb, 0x05, 0xe2, 0xc3, 0x9b, 0xe9, 0xfc,
				0xda, 0x6c, 0x19, 0x07, 0x8c, 0x6a, 0x9d, 0x1b }
	}
};

static crypto_test_reference_t aes_ctr_reference[] = {
	/* RFC3686 https://tools.ietf.org/html/rfc3686 */
	{
		.cipher_key_length = AES128_KEY_LEN,
		.cipher_key = { 0x7E, 0x24, 0x06, 0x78, 0x17, 0xFA, 0xE0, 0xD7,
				0x43, 0xD6, 0xCE, 0x1F, 0x32, 0x53, 0x91, 0x63},
		.cipher_iv_length = AES_CTR_IV_LEN,
		.cipher_iv = { 0x00, 0x6C, 0xB6, 0xDB, 0xC0, 0x54, 0x3B, 0x59,
			       0xDA, 0x48, 0xD9, 0x0B, 0x00, 0x00, 0x00, 0x01 },
		.length = 32,
		.plaintext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			       0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
			       0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
			       0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F },
		.ciphertext = { 0x51, 0x04, 0xA1, 0x06, 0x16, 0x8A, 0x72, 0xD9,
				0x79, 0x0D, 0x41, 0xEE, 0x8E, 0xDA, 0xD3, 0x88,
				0xEB, 0x2E, 0x1E, 0xFC, 0x46, 0xDA, 0x57, 0xC8,
				0xFC, 0xE6, 0x30, 0xDF, 0x91, 0x41, 0xBE, 0x28}
	},
	/* NIST Special Publication 800-38A */
	{
		.cipher_key_length = AES128_KEY_LEN,
		.cipher_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
				0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c},
		.cipher_iv_length = AES_CTR_IV_LEN,
		.cipher_iv = { 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
			       0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff },
		.length = 64,
		.plaintext = { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
			       0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
			       0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
			       0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
			       0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef,
			       0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
			       0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 },
		.ciphertext = { 0x87, 0x4d, 0x61, 0x91, 0xb6, 0x20, 0xe3, 0x26,
				0x1b, 0xef, 0x68, 0x64, 0x99, 0x0d, 0xb6, 0xce,
				0x98, 0x06, 0xf6, 0x6b, 0x79, 0x70, 0xfd, 0xff,
				0x86, 0x17, 0x18, 0x7b, 0xb9, 0xff, 0xfd, 0xff,
				0x5a, 0xe4, 0xdf, 0x3e, 0xdb, 0xd5, 0xd3, 0x5e,
				0x5b, 0x4f, 0x09, 0x02, 0x0d, 0xb0, 0x3e, 0xab,
				0x1e, 0x03, 0x1d, 0xda, 0x2f, 0xbe, 0x03, 0xd1,
				0x79, 0x21, 0x70, 0xa0, 0xf3, 0x00, 0x9c, 0xee }
	},
	/* Generated by Crypto++ 5.6.1 (715 bytes data)*/
	{
		.cipher_key_length = AES128_KEY_LEN,
		.cipher_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
				0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c},
		.cipher_iv_length = AES_CTR_IV_LEN,
		.cipher_iv = { 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
			       0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff },
		.length = 715,
		.plaintext = { 0x00, 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f,
			       0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17,
			       0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac,
			       0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e,
			       0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4,
			       0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52,
			       0xef, 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b,
			       0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37,
			       0x10, 0x00, 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40,
			       0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93,
			       0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03,
			       0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf,
			       0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c,
			       0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a,
			       0x52, 0xef, 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f,
			       0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c,
			       0x37, 0x10, 0x00, 0x6b, 0xc1, 0xbe, 0xe2, 0x2e,
			       0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
			       0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e,
			       0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45,
			       0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3,
			       0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a,
			       0x0a, 0x52, 0xef, 0xf6, 0x9f, 0x24, 0x45, 0xdf,
			       0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6,
			       0x6c, 0x37, 0x10, 0x00, 0x6b, 0xc1, 0xbe, 0xe2,
			       0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11,
			       0x73, 0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57,
			       0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac,
			       0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46,
			       0xa3, 0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19,
			       0x1a, 0x0a, 0x52, 0xef, 0xf6, 0x9f, 0x24, 0x45,
			       0xdf, 0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b,
			       0xe6, 0x6c, 0x37, 0x10, 0x00, 0x6b, 0xc1, 0xbe,
			       0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e,
			       0x11, 0x73, 0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a,
			       0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f,
			       0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c,
			       0x46, 0xa3, 0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1,
			       0x19, 0x1a, 0x0a, 0x52, 0xef, 0xf6, 0x9f, 0x24,
			       0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41,
			       0x7b, 0xe6, 0x6c, 0x37, 0x10, 0x00, 0x6b, 0xc1,
			       0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d,
			       0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0xae, 0x2d,
			       0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7,
			       0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8,
			       0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, 0xe5, 0xfb,
			       0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, 0xf6, 0x9f,
			       0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad, 0x2b,
			       0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10, 0x00, 0x6b,
			       0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9,
			       0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0xae,
			       0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e,
			       0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30,
			       0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, 0xe5,
			       0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, 0xf6,
			       0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad,
			       0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10, 0x00,
			       0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
			       0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
			       0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
			       0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
			       0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef,
			       0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
			       0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10,
			       0x00, 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f,
			       0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17,
			       0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac,
			       0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e,
			       0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4,
			       0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52,
			       0xef, 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b,
			       0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37,
			       0x10, 0x00, 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40,
			       0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93,
			       0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03,
			       0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf,
			       0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c,
			       0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a,
			       0x52, 0xef, 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f,
			       0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c,
			       0x37, 0x10, 0x00, 0x6b, 0xc1, 0xbe, 0xe2, 0x2e,
			       0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
			       0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e,
			       0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45,
			       0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3,
			       0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a,
			       0x0a, 0x52, 0xef, 0xf6, 0x9f, 0x24, 0x45, 0xdf,
			       0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6,
			       0x6c, 0x37, 0x10 },
		.ciphertext = { 0xEC, 0xE7, 0x1E, 0xCD, 0x7A, 0x4E, 0x3C, 0x2F,
				0x64, 0x3B, 0x2B, 0x0B, 0xFB, 0xED, 0x32, 0xF3,
				0x1C, 0x85, 0x51, 0xB6, 0x30, 0x6D, 0x52, 0xCF,
				0x84, 0x3E, 0xC0, 0xB8, 0x50, 0x15, 0xDC, 0x20,
				0x3B, 0x1C, 0x0B, 0x64, 0x3E, 0x2A, 0x6B, 0xAB,
				0xAF, 0x51, 0x33, 0xDA, 0x0E, 0xA0, 0x66, 0x16,
				0x07, 0x6A, 0xA6, 0xBB, 0xB5, 0x2E, 0xD7, 0x5D,
				0xC3, 0xA7, 0x1A, 0x9A, 0x6E, 0x8A, 0xC7, 0xC9,
				0xA0, 0x0D, 0x2C, 0x39, 0xAA, 0x68, 0xBF, 0x4E,
				0x6F, 0xFE, 0xD9, 0xAA, 0xEE, 0x5A, 0xD6, 0x91,
				0x4F, 0xB3, 0xEA, 0x77, 0xC7, 0xB6, 0x1F, 0xF6,
				0xBF, 0x56, 0x4F, 0x2F, 0x12, 0x25, 0xAC, 0xB4,
				0xB5, 0x88, 0x9C, 0xB1, 0x55, 0x98, 0x88, 0xA5,
				0x81, 0x78, 0x49, 0xC3, 0x82, 0xE1, 0x68, 0x48,
				0x2F, 0x75, 0x38, 0x1F, 0x63, 0x86, 0x8C, 0x46,
				0x8E, 0x4D, 0x15, 0x83, 0xB1, 0xFE, 0x71, 0xDD,
				0x80, 0x8C, 0xB9, 0x4D, 0x81, 0x50, 0xAA, 0xB9,
				0xD5, 0x30, 0xA0, 0xFC, 0x17, 0xCD, 0xE7, 0x48,
				0xE9, 0x55, 0x45, 0xD8, 0xA0, 0x33, 0xB2, 0xF6,
				0x1F, 0x19, 0x54, 0xD0, 0xC0, 0x22, 0x61, 0x68,
				0x02, 0x2E, 0x1C, 0xD7, 0xE0, 0x31, 0xC5, 0x7D,
				0x04, 0x8A, 0xC5, 0x60, 0xF1, 0x52, 0x96, 0x0F,
				0x47, 0x70, 0x5E, 0x17, 0x4D, 0x95, 0x6D, 0x4B,
				0xB5, 0x3A, 0xE8, 0x0B, 0xFF, 0xCD, 0x1B, 0xD5,
				0x69, 0xED, 0x8E, 0xFF, 0xA2, 0x23, 0xC0, 0x05,
				0x58, 0xB7, 0x02, 0x40, 0x5F, 0x33, 0xE6, 0xE0,
				0xED, 0xB2, 0xD9, 0xB0, 0xC1, 0x48, 0xA1, 0x44,
				0x1C, 0xC8, 0x0D, 0x6A, 0xBB, 0xCE, 0x78, 0x5A,
				0xA1, 0xB9, 0xDA, 0xB7, 0xCB, 0x88, 0x32, 0xF1,
				0xB1, 0x2D, 0x2E, 0xE6, 0x0E, 0xE2, 0xDF, 0xCA,
				0x37, 0x94, 0x2C, 0xA1, 0x72, 0x4E, 0x56, 0x02,
				0xB7, 0xB7, 0x05, 0x25, 0xAC, 0x96, 0x62, 0x02,
				0x8A, 0x22, 0xDB, 0x23, 0x46, 0x76, 0x61, 0x5D,
				0xB4, 0x74, 0x53, 0x8C, 0xBC, 0x8D, 0x19, 0x7F,
				0x38, 0xC8, 0x8B, 0xCC, 0x4F, 0x9E, 0x8D, 0x20,
				0x75, 0x38, 0xCA, 0x18, 0xDE, 0x5F, 0x09, 0x54,
				0x20, 0xA2, 0xE4, 0xD5, 0x86, 0x8C, 0xEB, 0xB8,
				0xB3, 0x4A, 0x93, 0x77, 0xDC, 0x52, 0xD1, 0x19,
				0x79, 0x0B, 0x65, 0x21, 0x0F, 0x1B, 0x34, 0x6F,
				0x5E, 0x00, 0xD9, 0xBD, 0x00, 0xA8, 0x84, 0x70,
				0x48, 0x91, 0x3D, 0x80, 0x72, 0x6B, 0x9B, 0x74,
				0x5D, 0x56, 0x5E, 0x62, 0x84, 0xB9, 0x86, 0xDB,
				0xAE, 0xA9, 0x97, 0xFF, 0xC5, 0xA0, 0xDE, 0x50,
				0x51, 0x52, 0x7D, 0x44, 0xB2, 0xC1, 0x26, 0x6D,
				0xBC, 0x91, 0x30, 0xA6, 0xEB, 0x15, 0xF3, 0x7A,
				0x0F, 0x00, 0xB6, 0x28, 0x6D, 0x66, 0x78, 0xCA,
				0x65, 0x1C, 0x07, 0x74, 0x3B, 0xD3, 0x7F, 0x2E,
				0x8F, 0x6A, 0x94, 0xF5, 0xED, 0x8C, 0x63, 0x42,
				0x8A, 0xE4, 0x88, 0x3A, 0x96, 0x95, 0x18, 0x38,
				0x07, 0xE1, 0x04, 0xBC, 0x33, 0x5C, 0x64, 0xFE,
				0xAA, 0xC4, 0x0A, 0x60, 0x59, 0x13, 0xDF, 0x98,
				0xFF, 0x44, 0xE0, 0x80, 0x1B, 0x31, 0xA9, 0x68,
				0xCC, 0xE5, 0xDC, 0xAF, 0xAD, 0xE1, 0xE0, 0x17,
				0xFA, 0x71, 0x1E, 0x05, 0xFF, 0x5A, 0x54, 0xBF,
				0xA1, 0x99, 0x9C, 0x2C, 0x46, 0x3F, 0x97, 0xA3,
				0xA6, 0x6B, 0x30, 0x21, 0x1B, 0xD3, 0x06, 0xC8,
				0x91, 0x1C, 0x98, 0xF8, 0xEE, 0x5E, 0xF4, 0x7A,
				0x54, 0x74, 0x6A, 0x4D, 0x16, 0xB7, 0xC7, 0x42,
				0x4A, 0x69, 0x54, 0xB4, 0xFC, 0x3B, 0xCF, 0x1A,
				0x41, 0xBD, 0xE8, 0xA1, 0x9C, 0xE1, 0x02, 0x7A,
				0xE8, 0x6A, 0x32, 0x0D, 0x0E, 0x5E, 0x7D, 0x3C,
				0x7E, 0x50, 0xCF, 0xD0, 0xC4, 0x66, 0x5B, 0x81,
				0x1D, 0x86, 0xC3, 0x13, 0xF0, 0x9A, 0xDE, 0x5B,
				0x4D, 0xBE, 0x01, 0x72, 0x31, 0x85, 0x98, 0x81,
				0xE5, 0x87, 0x3E, 0x9E, 0xDB, 0x20, 0x11, 0xCF,
				0x59, 0x20, 0xD2, 0xF7, 0x27, 0x7C, 0x4D, 0xE1,
				0xAC, 0x43, 0x0A, 0x18, 0x49, 0xF0, 0xB8, 0x70,
				0xA6, 0x9A, 0xBE, 0x70, 0x1B, 0x6D, 0x0B, 0x51,
				0x23, 0xE5, 0xFF, 0x53, 0x39, 0x54, 0x09, 0x17,
				0x7C, 0xF8, 0x4B, 0xF4, 0x1E, 0xC3, 0x3C, 0x5E,
				0x4B, 0xCC, 0x2C, 0xF2, 0x92, 0x58, 0xDC, 0x7C,
				0x26, 0x04, 0x71, 0xAA, 0xBD, 0xA4, 0x9F, 0xDE,
				0x62, 0x91, 0x57, 0x58, 0xEE, 0x4E, 0x57, 0x8D,
				0x0F, 0x76, 0x98, 0xE6, 0x45, 0x6B, 0xC1, 0x44,
				0x57, 0x37, 0x39, 0xD5, 0xD5, 0x08, 0xCC, 0x76,
				0xB3, 0x89, 0x35, 0x9D, 0x2A, 0x0E, 0xCB, 0x5B,
				0x7E, 0xE5, 0xFC, 0xB4, 0xC3, 0x15, 0x1D, 0x5A,
				0xF7, 0xC7, 0x18, 0x19, 0xEA, 0x3D, 0xD5, 0xF3,
				0x6C, 0x7B, 0x27, 0xE5, 0x51, 0xFD, 0x23, 0x73,
				0xD0, 0x7F, 0xFD, 0xC7, 0x6A, 0x13, 0xFC, 0x4B,
				0x10, 0xA6, 0xF2, 0x9A, 0x83, 0xD6, 0xF4, 0x65,
				0xAC, 0xB6, 0x96, 0x06, 0x71, 0xEA, 0xCF, 0x21,
				0xA3, 0xE1, 0xCB, 0x44, 0x11, 0xC4, 0xDA, 0xA0,
				0xC2, 0xA8, 0x7D, 0xAE, 0xD2, 0x8A, 0xEE, 0x60,
				0xB7, 0xEC, 0x02, 0x58, 0xA9, 0xAF, 0x12, 0x5F,
				0x2D, 0xDC, 0x80, 0xB9, 0x87, 0x7E, 0xFE, 0x0F,
				0x37, 0x2D, 0x9B, 0x83, 0x2C, 0x78, 0x67, 0x70,
				0xA8, 0x4E, 0xA1, 0xA0, 0x7C, 0xB6, 0xE1, 0xA9,
				0x90, 0x7D, 0x65, 0x1B, 0xBD, 0x0E, 0xFD, 0xEF,
				0x2A, 0xFF, 0xC3 }
	},
	/* RFC3686 https://tools.ietf.org/html/rfc3686 */
	{
		.cipher_key_length = AES192_KEY_LEN,
		.cipher_key = { 0x02, 0xBF, 0x39, 0x1E, 0xE8, 0xEC, 0xB1, 0x59,
				0xB9, 0x59, 0x61, 0x7B, 0x09, 0x65, 0x27, 0x9B,
				0xF5, 0x9B, 0x60, 0xA7, 0x86, 0xD3, 0xE0, 0xFE},
		.cipher_iv_length = AES_CTR_IV_LEN,
		.cipher_iv = { 0x00, 0x07, 0xBD, 0xFD, 0x5C, 0xBD, 0x60, 0x27,
			       0x8D, 0xCC, 0x09, 0x12, 0x00, 0x00, 0x00, 0x01 },
		.length = 36,
		.plaintext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			       0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
			       0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
			       0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,
			       0x20, 0x21, 0x22, 0x23 },
		.ciphertext = { 0x96, 0x89, 0x3F, 0xC5, 0x5E, 0x5C, 0x72, 0x2F,
				0x54, 0x0B, 0x7D, 0xD1, 0xDD, 0xF7, 0xE7, 0x58,
				0xD2, 0x88, 0xBC, 0x95, 0xC6, 0x91, 0x65, 0x88,
				0x45, 0x36, 0xC8, 0x11, 0x66, 0x2F, 0x21, 0x88,
				0xAB, 0xEE, 0x09, 0x35 }
	},
	/* NIST Special Publication 800-38A */
	{
		.cipher_key_length = AES192_KEY_LEN,
		.cipher_key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
				0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
				0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b},
		.cipher_iv_length = AES_CTR_IV_LEN,
		.cipher_iv = { 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
			       0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff },
		.length = 64,
		.plaintext = { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
			       0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
			       0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
			       0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
			       0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef,
			       0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
			       0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 },
		.ciphertext = { 0x1a, 0xbc, 0x93, 0x24, 0x17, 0x52, 0x1c, 0xa2,
				0x4f, 0x2b, 0x04, 0x59, 0xfe, 0x7e, 0x6e, 0x0b,
				0x09, 0x03, 0x39, 0xec, 0x0a, 0xa6, 0xfa, 0xef,
				0xd5, 0xcc, 0xc2, 0xc6, 0xf4, 0xce, 0x8e, 0x94,
				0x1e, 0x36, 0xb2, 0x6b, 0xd1, 0xeb, 0xc6, 0x70,
				0xd1, 0xbd, 0x1d, 0x66, 0x56, 0x20, 0xab, 0xf7,
				0x4f, 0x78, 0xa7, 0xf6, 0xd2, 0x98, 0x09, 0x58,
				0x5a, 0x97, 0xda, 0xec, 0x58, 0xc6, 0xb0, 0x50 }
	},
	/* RFC3686 https://tools.ietf.org/html/rfc3686 */
	{
		.cipher_key_length = AES256_KEY_LEN,
		.cipher_key = { 0xFF, 0x7A, 0x61, 0x7C, 0xE6, 0x91, 0x48, 0xE4,
				0xF1, 0x72, 0x6E, 0x2F, 0x43, 0x58, 0x1D, 0xE2,
				0xAA, 0x62, 0xD9, 0xF8, 0x05, 0x53, 0x2E, 0xDF,
				0xF1, 0xEE, 0xD6, 0x87, 0xFB, 0x54, 0x15, 0x3D},
		.cipher_iv_length = AES_CTR_IV_LEN,
		.cipher_iv = { 0x00, 0x1C, 0xC5, 0xB7, 0x51, 0xA5, 0x1D, 0x70,
			       0xA1, 0xC1, 0x11, 0x48, 0x00, 0x00, 0x00, 0x01 },
		.length = 36,
		.plaintext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			       0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
			       0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
			       0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,
			       0x20, 0x21, 0x22, 0x23 },
		.ciphertext = { 0xEB, 0x6C, 0x52, 0x82, 0x1D, 0x0B, 0xBB, 0xF7,
				0xCE, 0x75, 0x94, 0x46, 0x2A, 0xCA, 0x4F, 0xAA,
				0xB4, 0x07, 0xDF, 0x86, 0x65, 0x69, 0xFD, 0x07,
				0xF4, 0x8C, 0xC0, 0xB5, 0x83, 0xD6, 0x07, 0x1F,
				0x1E, 0xC0, 0xE6, 0xB8 },
	},
	/* NIST Special Publication 800-38A */
	{
		.cipher_key_length = AES256_KEY_LEN,
		.cipher_key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
				0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
				0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7,
				0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4},
		.cipher_iv_length = AES_CTR_IV_LEN,
		.cipher_iv = { 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
			       0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff },
		.length = 64,
		.plaintext = { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
			       0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
			       0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
			       0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
			       0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef,
			       0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
			       0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 },
		.ciphertext = { 0x60, 0x1e, 0xc3, 0x13, 0x77, 0x57, 0x89, 0xa5,
				0xb7, 0xa7, 0xf5, 0x04, 0xbb, 0xf3, 0xd2, 0x28,
				0xf4, 0x43, 0xe3, 0xca, 0x4d, 0x62, 0xb5, 0x9a,
				0xca, 0x84, 0xe9, 0x90, 0xca, 0xca, 0xf5, 0xc5,
				0x2b, 0x09, 0x30, 0xda, 0xa2, 0x3d, 0xe9, 0x4c,
				0xe8, 0x70, 0x17, 0xba, 0x2d, 0x84, 0x98, 0x8d,
				0xdf, 0xc9, 0xc5, 0x8d, 0xb6, 0x7a, 0xad, 0xa6,
				0x13, 0xc2, 0xdd, 0x08, 0x45, 0x79, 0x41, 0xa6 }
	},
};

static crypto_test_reference_t aes_ecb_reference[] = {
	/* NIST Special Publication 800-38A */
	{
		.cipher_key_length = AES128_KEY_LEN,
		.cipher_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
				0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c},
		.length = 64,
		.plaintext = { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
			       0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
			       0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
			       0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
			       0xe5, 0xfb, 0xc1, 0x19,	0x1a, 0x0a, 0x52, 0xef,
			       0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
			       0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10},
		.ciphertext = { 0x3a, 0xd7, 0x7b, 0xb4, 0x0d, 0x7a, 0x36, 0x60,
				0xa8, 0x9e, 0xca, 0xf3, 0x24, 0x66, 0xef, 0x97,
				0xf5, 0xd3, 0xd5, 0x85, 0x03, 0xb9, 0x69, 0x9d,
				0xe7, 0x85, 0x89, 0x5a, 0x96, 0xfd, 0xba, 0xaf,
				0x43, 0xb1, 0xcd, 0x7f, 0x59, 0x8e, 0xce, 0x23,
				0x88, 0x1b, 0x00, 0xe3, 0xed, 0x03, 0x06, 0x88,
				0x7b, 0x0c, 0x78, 0x5e, 0x27, 0xe8, 0xad, 0x3f,
				0x82, 0x23, 0x20, 0x71, 0x04, 0x72, 0x5d, 0xd4 }
	},
	/* Generated by Crypto++ 5.6.1 (528 bytes) */
	{
		.cipher_key_length = AES128_KEY_LEN,
		.cipher_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
				0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c},
		.length = 528,
		.plaintext = { 0x00, 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f,
			       0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17,
			       0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac,
			       0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e,
			       0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4,
			       0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52,
			       0xef, 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b,
			       0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37,
			       0x10, 0x00, 0x00, 0x6b, 0xc1, 0xbe, 0xe2, 0x2e,
			       0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
			       0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e,
			       0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45,
			       0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3,
			       0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a,
			       0x0a, 0x52, 0xef, 0xf6, 0x9f, 0x24, 0x45, 0xdf,
			       0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6,
			       0x6c, 0x37, 0x10, 0x00, 0x00, 0x6b, 0xc1, 0xbe,
			       0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e,
			       0x11, 0x73, 0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a,
			       0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f,
			       0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c,
			       0x46, 0xa3, 0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1,
			       0x19, 0x1a, 0x0a, 0x52, 0xef, 0xf6, 0x9f, 0x24,
			       0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41,
			       0x7b, 0xe6, 0x6c, 0x37, 0x10, 0x00, 0x00, 0x6b,
			       0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9,
			       0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0xae,
			       0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e,
			       0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30,
			       0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, 0xe5,
			       0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, 0xf6,
			       0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad,
			       0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10, 0x00,
			       0x00, 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f,
			       0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17,
			       0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac,
			       0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e,
			       0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4,
			       0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52,
			       0xef, 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b,
			       0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37,
			       0x10, 0x00, 0x00, 0x6b, 0xc1, 0xbe, 0xe2, 0x2e,
			       0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
			       0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e,
			       0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f, 0xac, 0x45,
			       0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, 0xa3,
			       0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a,
			       0x0a, 0x52, 0xef, 0xf6, 0x9f, 0x24, 0x45, 0xdf,
			       0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b, 0xe6,
			       0x6c, 0x37, 0x10, 0x00,	0x00, 0x6b, 0xc1, 0xbe,
			       0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e,
			       0x11, 0x73, 0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a,
			       0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e, 0xb7, 0x6f,
			       0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c,
			       0x46, 0xa3, 0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1,
			       0x19, 0x1a, 0x0a, 0x52, 0xef, 0xf6, 0x9f, 0x24,
			       0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41,
			       0x7b, 0xe6, 0x6c, 0x37, 0x10, 0x00, 0x00, 0x6b,
			       0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9,
			       0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, 0xae,
			       0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, 0x9e,
			       0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30,
			       0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, 0xe5,
			       0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, 0xf6,
			       0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad,
			       0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10, 0x00},
		.ciphertext = { 0x84, 0xC6, 0xCB, 0xDC, 0x2B, 0x5A, 0x39, 0x98,
				0x57, 0x74, 0xB2, 0x3B, 0xAB, 0x06, 0x6A, 0x6A,
				0xF8, 0xCB, 0x66, 0xC0, 0x8E, 0x4F, 0x05, 0x8E,
				0x5D, 0x3E, 0x7C, 0x35, 0x1E, 0xA8, 0x45, 0xCE,
				0xC7, 0xB2, 0x09, 0x21, 0x0E, 0xE7, 0xEF, 0xD3,
				0x82, 0x69, 0x62, 0x86, 0x87, 0xF2, 0x1C, 0xB9,
				0xBC, 0xEA, 0x34, 0x9D, 0xC0, 0x41, 0x8A, 0xDB,
				0xA2, 0xBF, 0x23, 0x64, 0xDF, 0x4D, 0xB1, 0xA1,
				0x1A, 0xD8, 0x4C, 0xF6, 0xA4, 0x22, 0xCE, 0x95,
				0xC3, 0x7B, 0x2C, 0xF8, 0x11, 0x96, 0x24, 0x5C,
				0xD8, 0x57, 0xD0, 0xB9, 0x54, 0xB8, 0x39, 0x85,
				0xC1, 0x88, 0x82, 0x30, 0xF3, 0xC3, 0x01, 0x84,
				0x7A, 0xAF, 0x71, 0x42, 0x53, 0xEF, 0x76, 0x8C,
				0x17, 0xE8, 0x9E, 0x4F, 0x55, 0x13, 0xDB, 0xD5,
				0xBE, 0xE1, 0x26, 0x6A, 0x2B, 0x2D, 0x70, 0x63,
				0xCE, 0x3D, 0x0B, 0xA8, 0x71, 0x62, 0x52, 0xC5,
				0xBC, 0xBB, 0x99, 0x22, 0xCD, 0x46, 0xF3, 0x74,
				0xB5, 0x2F, 0xDF, 0xF1, 0xFE, 0xBF, 0x15, 0x5F,
				0xF4, 0xAF, 0xEE, 0x18, 0x78, 0x89, 0x99, 0xBC,
				0x74, 0x23, 0x4A, 0x3F, 0xFB, 0xA7, 0xB2, 0x85,
				0x8B, 0xB2, 0x55, 0x2F, 0x17, 0x2E, 0x56, 0xEC,
				0x47, 0x45, 0x68, 0x78, 0x44, 0x0A, 0xBB, 0x5A,
				0xDA, 0xE4, 0x99, 0x41, 0xC1, 0xE4, 0x36, 0x16,
				0xAC, 0x5D, 0x6E, 0x31, 0xA0, 0x11, 0x61, 0x1B,
				0x82, 0x9F, 0x6A, 0x77, 0xBE, 0x1F, 0x50, 0x75,
				0x4F, 0x81, 0xF3, 0x5D, 0x24, 0xED, 0x89, 0xFD,
				0xE8, 0x04, 0xB1, 0x73, 0x63, 0xF9, 0xA8, 0x1C,
				0x3F, 0x12, 0xAE, 0x06, 0x7F, 0xDD, 0x41, 0xA2,
				0x98, 0x49, 0x12, 0xCA, 0xE1, 0x92, 0x6C, 0x5F,
				0xB3, 0xAC, 0x18, 0xE5, 0x41, 0xFA, 0x4A, 0xD1,
				0xE1, 0x71, 0x88, 0x8E, 0x61, 0x42, 0x8F, 0x2A,
				0x8F, 0x2E, 0x98, 0x1A, 0xE1, 0x6D, 0x0D, 0x4E,
				0x41, 0xD3, 0x3E, 0x5E, 0x67, 0x5F, 0x44, 0x6D,
				0xAE, 0x0F, 0x45, 0x4F, 0xC4, 0xCA, 0x05, 0x6F,
				0x41, 0xF3, 0xCC, 0x47, 0x44, 0xA9, 0xE9, 0x48,
				0x42, 0x8B, 0x22, 0x80, 0xF9, 0x66, 0x63, 0xB7,
				0x23, 0x0C, 0x09, 0x69, 0x25, 0x03, 0xC9, 0x5B,
				0x3E, 0x34, 0xF8, 0xDE, 0x8D, 0xF2, 0x31, 0x57,
				0xF4, 0x5B, 0xDF, 0x68, 0x9B, 0x25, 0x8D, 0x99,
				0x4D, 0x9E, 0x6C, 0xE5, 0xD4, 0xDD, 0x6B, 0xDB,
				0x96, 0x76, 0x3C, 0xCC, 0x41, 0xDB, 0xBE, 0x57,
				0xA4, 0x77, 0x8D, 0x5A, 0x9E, 0x90, 0x22, 0x6D,
				0x61, 0x4C, 0x33, 0x5E, 0x44, 0xCA, 0x8A, 0xB4,
				0x1E, 0xFE, 0xA8, 0x98, 0xBC, 0x17, 0x0C, 0x65,
				0x41, 0x2F, 0x77, 0x19, 0x4A, 0x43, 0xA1, 0x30,
				0x5E, 0xF2, 0x3A, 0xC7, 0x0B, 0x05, 0x9E, 0x6E,
				0x04, 0x77, 0x96, 0xEF, 0x51, 0x8D, 0x76, 0x96,
				0xBC, 0x3D, 0xAD, 0x5E, 0x26, 0x34, 0xF9, 0x2D,
				0xD1, 0xC9, 0x0D, 0x20, 0x6A, 0x2B, 0x6D, 0x3A,
				0x7C, 0xE8, 0x86, 0x68, 0xBE, 0xAD, 0x64, 0x61,
				0x4E, 0x90, 0x00, 0xAC, 0xFB, 0xA7, 0x9E, 0xB3,
				0x60, 0x16, 0x06, 0x21, 0x4E, 0x21, 0xE0, 0x8F,
				0x14, 0xCE, 0x77, 0xE3, 0x6B, 0xB6, 0x6F, 0xE4,
				0xA0, 0xFC, 0xD2, 0xA2, 0x1B, 0xCA, 0xA2, 0x39,
				0x1A, 0x9C, 0x20, 0x16, 0xAC, 0x3B, 0xC7, 0xCD,
				0xF1, 0x43, 0x8E, 0xB6, 0xDD, 0x26, 0x69, 0x66,
				0x44, 0x58, 0x3E, 0x2B, 0x0A, 0x0C, 0x68, 0x62,
				0x9D, 0x73, 0x6F, 0x67, 0x23, 0xDF, 0x66, 0x85,
				0x9C, 0xF8, 0x0B, 0x4E, 0x5B, 0x5C, 0x5B, 0xF0,
				0x3F, 0x33, 0x4D, 0x65, 0xC4, 0x8D, 0xB3, 0xB2,
				0x66, 0x0E, 0x2C, 0xE3, 0x3B, 0x51, 0x0F, 0xD6,
				0x0C, 0x91, 0x2B, 0x85, 0xD1, 0x6A, 0xEE, 0x7C,
				0xDB, 0xFD, 0xF6, 0x28, 0x5B, 0x0A, 0x77, 0xBA,
				0xE0, 0x7D, 0x98, 0x7F, 0x9C, 0xE1, 0x72, 0xA5,
				0x48, 0xE6, 0xBF, 0x0A, 0x30, 0xCF, 0x09, 0x9A,
				0xA8, 0x2B, 0xE0, 0xA2, 0x5E, 0x0E, 0x89, 0x19 }
	},
	/* NIST Special Publication 800-38A */
	{
		.cipher_key_length = AES192_KEY_LEN,
		.cipher_key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
				0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
				0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b},
		.length = 64,
		.plaintext = { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
			       0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
			       0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
			       0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
			       0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef,
			       0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
			       0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 },
		.ciphertext = { 0xbd, 0x33, 0x4f, 0x1d, 0x6e, 0x45, 0xf2, 0x5f,
				0xf7, 0x12, 0xa2, 0x14, 0x57, 0x1f, 0xa5, 0xcc,
				0x97, 0x41, 0x04, 0x84, 0x6d, 0x0a, 0xd3, 0xad,
				0x77, 0x34, 0xec, 0xb3, 0xec, 0xee, 0x4e, 0xef,
				0xef, 0x7a, 0xfd, 0x22, 0x70, 0xe2, 0xe6, 0x0a,
				0xdc, 0xe0, 0xba, 0x2f, 0xac, 0xe6, 0x44, 0x4e,
				0x9a, 0x4b, 0x41, 0xba, 0x73, 0x8d, 0x6c, 0x72,
				0xfb, 0x16, 0x69, 0x16, 0x03, 0xc1, 0x8e, 0x0e }
	},
	/* NIST Special Publication 800-38A */
	{
		.cipher_key_length = AES256_KEY_LEN,
		.cipher_key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
				0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
				0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7,
				0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4},
		.length = 64,
		.plaintext = { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
			       0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
			       0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
			       0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
			       0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef,
			       0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
			       0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 },
		.ciphertext = { 0xf3, 0xee, 0xd1, 0xbd, 0xb5, 0xd2, 0xa0, 0x3c,
				0x06, 0x4b, 0x5a, 0x7e, 0x3d, 0xb1, 0x81, 0xf8,
				0x59, 0x1c, 0xcb, 0x10, 0xd4, 0x10, 0xed, 0x26,
				0xdc, 0x5b, 0xa7, 0x4a, 0x31, 0x36, 0x28, 0x70,
				0xb6, 0xed, 0x21, 0xb9, 0x9c, 0xa6, 0xf4, 0xf9,
				0xf1, 0x53, 0xe7, 0xb1, 0xbe, 0xaf, 0xed, 0x1d,
				0x23, 0x30, 0x4b, 0x7a, 0x39, 0xf9, 0xf3, 0xff,
				0x06, 0x7d, 0x8d, 0x8f, 0x9e, 0x24, 0xec, 0xc7}
	}
};

static crypto_test_reference_t aes_cfb128_reference[] = {
	/* NIST Special Publication 800-38A */
	{
		.cipher_key_length = AES128_KEY_LEN,
		.cipher_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
				0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c},
		.cipher_iv_length = AES_CFB128_IV_LEN,
		.cipher_iv = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			       0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
		.length = 64,
		.plaintext = { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
			       0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
			       0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
			       0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
			       0xe5, 0xfb, 0xc1, 0x19,	0x1a, 0x0a, 0x52, 0xef,
			       0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
			       0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10},
		.ciphertext = { 0x3b, 0x3f, 0xd9, 0x2e, 0xb7, 0x2d, 0xad, 0x20,
				0x33, 0x34, 0x49, 0xf8, 0xe8, 0x3c, 0xfb, 0x4a,
				0xc8, 0xa6, 0x45, 0x37, 0xa0, 0xb3, 0xa9, 0x3f,
				0xcd, 0xe3, 0xcd, 0xad, 0x9f, 0x1c, 0xe5, 0x8b,
				0x26, 0x75, 0x1f, 0x67, 0xa3, 0xcb, 0xb1, 0x40,
				0xb1, 0x80, 0x8c, 0xf1, 0x87, 0xa4, 0xf4, 0xdf,
				0xc0, 0x4b, 0x05, 0x35, 0x7c, 0x5d, 0x1c, 0x0e,
				0xea, 0xc4, 0xc6, 0x6f, 0x9f, 0xf7, 0xf2, 0xe6 }
	},
	/* NIST Special Publication 800-38A */
	{
		.cipher_key_length = AES192_KEY_LEN,
		.cipher_key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
				0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
				0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b},
		.cipher_iv_length = AES_CFB128_IV_LEN,
		.cipher_iv = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			       0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
		.length = 64,
		.plaintext = { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
			       0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
			       0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
			       0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
			       0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef,
			       0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
			       0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 },
		.ciphertext = { 0xcd, 0xc8, 0x0d, 0x6f, 0xdd, 0xf1, 0x8c, 0xab,
				0x34, 0xc2, 0x59, 0x09, 0xc9, 0x9a, 0x41, 0x74,
				0x67, 0xce, 0x7f, 0x7f, 0x81, 0x17, 0x36, 0x21,
				0x96, 0x1a, 0x2b, 0x70, 0x17, 0x1d, 0x3d, 0x7a,
				0x2e, 0x1e, 0x8a, 0x1d, 0xd5, 0x9b, 0x88, 0xb1,
				0xc8, 0xe6, 0x0f, 0xed, 0x1e, 0xfa, 0xc4, 0xc9,
				0xc0, 0x5f, 0x9f, 0x9c, 0xa9, 0x83, 0x4f, 0xa0,
				0x42, 0xae, 0x8f, 0xba, 0x58, 0x4b, 0x09, 0xff }
	},
	/* NIST Special Publication 800-38A */
	{
		.cipher_key_length = AES256_KEY_LEN,
		.cipher_key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
				0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
				0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7,
				0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4},
		.cipher_iv_length = AES_CFB128_IV_LEN,
		.cipher_iv = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			       0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
		.length = 64,
		.plaintext = { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
			       0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
			       0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
			       0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
			       0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef,
			       0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
			       0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 },
		.ciphertext = { 0xdc, 0x7e, 0x84, 0xbf, 0xda, 0x79, 0x16, 0x4b,
				0x7e, 0xcd, 0x84, 0x86, 0x98, 0x5d, 0x38, 0x60,
				0x39, 0xff, 0xed, 0x14, 0x3b, 0x28, 0xb1, 0xc8,
				0x32, 0x11, 0x3c, 0x63, 0x31, 0xe5, 0x40, 0x7b,
				0xdf, 0x10, 0x13, 0x24, 0x15, 0xe5, 0x4b, 0x92,
				0xa1, 0x3e, 0xd0, 0xa8, 0x26, 0x7a, 0xe2, 0xf9,
				0x75, 0xa3, 0x85, 0x74, 0x1a, 0xb9, 0xce, 0xf8,
				0x20, 0x31, 0x62, 0x3d, 0x55, 0xb1, 0xe4, 0x71 }
	}
};

static crypto_test_reference_t aes_xts_reference[] = {
	/* CAVS 11.0  XTSGen information, #1 */
	{
		.cipher_key_length = AES128_XTS_KEY_LEN,
		.cipher_key = { 0xa1, 0xb9, 0x0c, 0xba, 0x3f, 0x06, 0xac, 0x35,
				0x3b, 0x2c, 0x34, 0x38, 0x76, 0x08, 0x17, 0x62,
				0x09, 0x09, 0x23, 0x02, 0x6e, 0x91, 0x77, 0x18,
				0x15, 0xf2, 0x9d, 0xab, 0x01, 0x93, 0x2f, 0x2f},
		.cipher_iv_length = AES_XTS_IV_LEN,
		.cipher_iv = { 0x4f, 0xae, 0xf7, 0x11, 0x7c, 0xda, 0x59, 0xc6,
			       0x6e, 0x4b, 0x92, 0x01, 0x3e, 0x76, 0x8a, 0xd5},
		.length = 16,
		.plaintext = { 0xeb, 0xab, 0xce, 0x95, 0xb1, 0x4d, 0x3c, 0x8d,
			       0x6f, 0xb3, 0x50, 0x39, 0x07, 0x90, 0x31, 0x1c},
		.ciphertext = { 0x77, 0x8a, 0xe8, 0xb4, 0x3c, 0xb9, 0x8d, 0x5a,
				0x82, 0x50, 0x81, 0xd5, 0xbe, 0x47, 0x1c, 0x63}
	},
	/* CAVS 11.0  XTSGen information, #101 */
	{
		.cipher_key_length = AES128_XTS_KEY_LEN,
		.cipher_key = { 0xb7, 0xb9, 0x3f, 0x51, 0x6a, 0xef, 0x29, 0x5e,
				0xff, 0x3a, 0x29, 0xd8, 0x37, 0xcf, 0x1f, 0x13,
				0x53, 0x47, 0xe8, 0xa2, 0x1d, 0xae, 0x61, 0x6f,
				0xf5, 0x06, 0x2b, 0x2e, 0x8d, 0x78, 0xce, 0x5e},
		.cipher_iv_length = AES_XTS_IV_LEN,
		.cipher_iv = { 0x87, 0x3e, 0xde, 0xa6, 0x53, 0xb6, 0x43, 0xbd,
			       0x8b, 0xcf, 0x51, 0x40, 0x31, 0x97, 0xed, 0x14},
		.length = 32,
		.plaintext = { 0x23, 0x6f, 0x8a, 0x5b, 0x58, 0xdd, 0x55, 0xf6,
			       0x19, 0x4e, 0xd7, 0x0c, 0x4a, 0xc1, 0xa1, 0x7f,
			       0x1f, 0xe6, 0x0e, 0xc9, 0xa6, 0xc4, 0x54, 0xd0,
			       0x87, 0xcc, 0xb7, 0x7d, 0x6b, 0x63, 0x8c, 0x47},
		.ciphertext = { 0x22, 0xe6, 0xa3, 0xc6, 0x37, 0x9d, 0xcf, 0x75,
				0x99, 0xb0, 0x52, 0xb5, 0xa7, 0x49, 0xc7, 0xf7,
				0x8a, 0xd8, 0xa1, 0x1b, 0x9f, 0x1a, 0xa9, 0x43,
				0x0c, 0xf3, 0xae, 0xf4, 0x45, 0x68, 0x2e, 0x19}
	},
	/* CAVS 11.0  XTSGen information, #227 TODO (Length 130 bits)*/
	/* {
		.cipher_key_length = AES128_XTS_KEY_LEN,
		.cipher_key = { 0xec, 0x14, 0xc0, 0xa3, 0xb7, 0x72, 0x58, 0x5c,
				0x15, 0xd4, 0xeb, 0x94, 0xe6, 0x9e, 0x2c, 0x55,
				0x80, 0xcf, 0x3a, 0x63, 0xc1, 0x7c, 0xe9, 0xda,
				0xd8, 0x2b, 0xb4, 0x54, 0xe3, 0x87, 0x90, 0x45},
		.cipher_iv_length = AES_XTS_IV_LEN,
		.cipher_iv = { 0x4a, 0x02, 0x87, 0xc2, 0x6e, 0xd2, 0x41, 0x26,
			       0x5b, 0x3a, 0x42, 0xcd, 0xd1, 0x9c, 0xea, 0xe2},
		.length = 17,
		.plaintext = { 0x50, 0x82, 0x64, 0x75, 0x82, 0xc6, 0xe5, 0xa7,
			       0x88, 0x73, 0x6f, 0xc5, 0x90, 0x5e, 0xa5, 0x65,
			       0xc0 },
		.ciphertext = { 0x04, 0x3a, 0xb9, 0xc0, 0x3d, 0x5b, 0x44, 0x13,
				0x1d, 0x3e, 0x6e, 0xb2, 0x57, 0x61, 0x89, 0xde,
				0x80 },
	}, */
	/* CAVS 11.0  XTSGen information, #1 */
	{
		.cipher_key_length = AES256_XTS_KEY_LEN,
		.cipher_key = { 0x1e, 0xa6, 0x61, 0xc5, 0x8d, 0x94, 0x3a, 0x0e,
				0x48, 0x01, 0xe4, 0x2f, 0x4b, 0x09, 0x47, 0x14,
				0x9e, 0x7f, 0x9f, 0x8e, 0x3e, 0x68, 0xd0, 0xc7,
				0x50, 0x52, 0x10, 0xbd, 0x31, 0x1a, 0x0e, 0x7c,
				0xd6, 0xe1, 0x3f, 0xfd, 0xf2, 0x41, 0x8d, 0x8d,
				0x19, 0x11, 0xc0, 0x04, 0xcd, 0xa5, 0x8d, 0xa3,
				0xd6, 0x19, 0xb7, 0xe2, 0xb9, 0x14, 0x1e, 0x58,
				0x31, 0x8e, 0xea, 0x39, 0x2c, 0xf4, 0x1b, 0x08},
		.cipher_iv_length = AES_XTS_IV_LEN,
		.cipher_iv = { 0xad, 0xf8, 0xd9, 0x26, 0x27, 0x46, 0x4a, 0xd2,
			       0xf0, 0x42, 0x8e, 0x84, 0xa9, 0xf8, 0x75, 0x64},
		.length = 32,
		.plaintext = { 0x2e, 0xed, 0xea, 0x52, 0xcd, 0x82, 0x15, 0xe1,
			       0xac, 0xc6, 0x47, 0xe8, 0x10, 0xbb, 0xc3, 0x64,
			       0x2e, 0x87, 0x28, 0x7f, 0x8d, 0x2e, 0x57, 0xe3,
			       0x6c, 0x0a, 0x24, 0xfb, 0xc1, 0x2a, 0x20, 0x2e},
		.ciphertext = { 0xcb, 0xaa, 0xd0, 0xe2, 0xf6, 0xce, 0xa3, 0xf5,
				0x0b, 0x37, 0xf9, 0x34, 0xd4, 0x6a, 0x9b, 0x13,
				0x0b, 0x9d, 0x54, 0xf0, 0x7e, 0x34, 0xf3, 0x6a,
				0xf7, 0x93, 0xe8, 0x6f, 0x73, 0xc6, 0xd7, 0xdb},
	},
	/* CAVS 11.0  XTSGen information, #110 */
	{
		.cipher_key_length = AES256_XTS_KEY_LEN,
		.cipher_key = { 0x6b, 0x19, 0x84, 0xc2, 0x4e, 0x7e, 0xb6, 0x62,
				0x8e, 0x3a, 0x11, 0xc9, 0xcc, 0xd2, 0x59, 0x40,
				0x33, 0xa3, 0xa0, 0xd9, 0x01, 0x6e, 0xae, 0x65,
				0xc2, 0xf2, 0x4e, 0x09, 0xb9, 0xa6, 0x6e, 0x9f,
				0xe9, 0xd1, 0x63, 0xa5, 0x06, 0xdf, 0xbc, 0xcf,
				0x2d, 0x93, 0xe8, 0x99, 0x1e, 0x2f, 0xc5, 0x60,
				0xe1, 0x04, 0x35, 0xb8, 0x90, 0xb5, 0x88, 0x9a,
				0x50, 0x03, 0xe4, 0xbf, 0x81, 0x7d, 0xc3, 0xe0},
		.cipher_iv_length = AES_XTS_IV_LEN,
		.cipher_iv = { 0x6b, 0xb0, 0xd3, 0xae, 0x4f, 0xa8, 0x6e, 0x43,
			       0x16, 0x19, 0xe4, 0x07, 0xd5, 0x9a, 0xd4, 0xf4},
		.length = 48,
		.plaintext = { 0x6a, 0x74, 0x1a, 0x94, 0x5b, 0xfb, 0xf0, 0xc6,
			       0x7a, 0xfd, 0x43, 0xba, 0x1f, 0x84, 0x18, 0x16,
			       0xc0, 0x99, 0x51, 0x58, 0x05, 0xd0, 0xfc, 0x1f,
			       0x7d, 0xbf, 0x6d, 0xe9, 0x00, 0xe0, 0xaa, 0x7a,
			       0x21, 0x9c, 0x88, 0x56, 0x32, 0x71, 0xb0, 0x09,
			       0xd1, 0xac, 0x90, 0xeb, 0x7d, 0xc9, 0x97, 0x35},
		.ciphertext = { 0xe4, 0x7b, 0xce, 0x29, 0x2b, 0xaa, 0x63, 0xbe,
				0xf3, 0x16, 0xf6, 0x80, 0xa5, 0xf4, 0x80, 0xa7,
				0xb8, 0x83, 0xdf, 0xab, 0x6e, 0xd5, 0xa5, 0x7f,
				0x7e, 0x29, 0xec, 0xb8, 0x9e, 0x35, 0x4a, 0x31,
				0xc9, 0xb1, 0x74, 0xc4, 0xab, 0xad, 0x6c, 0xba,
				0xba, 0xba, 0x19, 0x14, 0x0c, 0x46, 0x20, 0xa3},
	},
	/* CAVS 11.0  XTSGen information, #211 TODO: length 140 bits */
	/* {
		.cipher_key_length = AES256_XTS_KEY_LEN,
		.cipher_key = { 0x62, 0xc2, 0xe4, 0xf8, 0x52, 0xa9, 0x3e, 0xea,
				0x4a, 0x2f, 0x61, 0xe8, 0x67, 0x68, 0x14, 0xf4,
				0xa8, 0x0d, 0xc4, 0x7e, 0xe1, 0x81, 0x32, 0xc8,
				0x38, 0xbf, 0x89, 0xa6, 0x18, 0xfd, 0xb8, 0xe2,
				0x91, 0x3e, 0x2e, 0x5c, 0x32, 0x1b, 0x19, 0xea,
				0x04, 0xbb, 0xa6, 0x34, 0x7d, 0x22, 0x6f, 0x41,
				0xdb, 0xee, 0x88, 0x0d, 0x61, 0x67, 0xb8, 0xe1,
				0xe9, 0x17, 0xfa, 0xf0, 0x46, 0xf0, 0x87, 0x5e},
		.cipher_iv_length = AES_XTS_IV_LEN,
		.cipher_iv = { 0x53, 0x7e, 0xe3, 0xdc, 0x13, 0xce, 0x27, 0xa8,
			       0xd3, 0x0e, 0x6e, 0x42, 0xb5, 0xb9, 0x96, 0xae},
		.length = 18,
		.plaintext = { 0x00, 0xc9, 0xeb, 0x87, 0x78, 0xe0, 0x3d, 0xdd,
			       0x5f, 0x3d, 0xe8, 0xc1, 0x8b, 0x34, 0x8f, 0xac,
			       0x9c, 0x30},
		.ciphertext = { 0x9d, 0x4a, 0x08, 0xac, 0x0f, 0xb4, 0x4e, 0x90,
				0xd0, 0x5f, 0x62, 0x86, 0x19, 0x3f, 0x3a, 0xab,
				0xc2, 0x90},
	} */
};

/* AES-GCM test vectors extracted from
 * https://tools.ietf.org/html/draft-mcgrew-gcm-test-01#section-2
 */
static crypto_test_reference_t aes_gcm_reference[] = {
	{
		.cipher_key_length = AES128_KEY_LEN,
		.cipher_key = { 0x4c, 0x80, 0xcd, 0xef, 0xbb, 0x5d, 0x10, 0xda,
				0x90, 0x6a, 0xc7, 0x3c, 0x36, 0x13, 0xa6, 0x34},
		.cipher_iv_length = AES_GCM_IV_LEN,
		.cipher_iv = { 0x2e, 0x44, 0x3b, 0x68, 0x49, 0x56, 0xed, 0x7e,
			       0x3b, 0x24, 0x4c, 0xfe },
		.length = 72,
		.plaintext = { 0x45, 0x00, 0x00, 0x48, 0x69, 0x9a, 0x00, 0x00,
			       0x80, 0x11, 0x4d, 0xb7, 0xc0, 0xa8, 0x01, 0x02,
			       0xc0, 0xa8, 0x01, 0x01, 0x0a, 0x9b, 0xf1, 0x56,
			       0x38, 0xd3, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
			       0x00, 0x00, 0x00, 0x00, 0x04, 0x5f, 0x73, 0x69,
			       0x70, 0x04, 0x5f, 0x75, 0x64, 0x70, 0x03, 0x73,
			       0x69, 0x70, 0x09, 0x63, 0x79, 0x62, 0x65, 0x72,
			       0x63, 0x69, 0x74, 0x79, 0x02, 0x64, 0x6b, 0x00,
			       0x00, 0x21, 0x00, 0x01, 0x01, 0x02, 0x02, 0x01 },
		.ciphertext = { 0xfe, 0xcf, 0x53, 0x7e, 0x72, 0x9d, 0x5b, 0x07,
				0xdc, 0x30, 0xdf, 0x52, 0x8d, 0xd2, 0x2b, 0x76,
				0x8d, 0x1b, 0x98, 0x73, 0x66, 0x96, 0xa6, 0xfd,
				0x34, 0x85, 0x09, 0xfa, 0x13, 0xce, 0xac, 0x34,
				0xcf, 0xa2, 0x43, 0x6f, 0x14, 0xa3, 0xf3, 0xcf,
				0x65, 0x92, 0x5b, 0xf1, 0xf4, 0xa1, 0x3c, 0x5d,
				0x15, 0xb2, 0x1e, 0x18, 0x84, 0xf5, 0xff, 0x62,
				0x47, 0xae, 0xab, 0xb7, 0x86, 0xb9, 0x3b, 0xce,
				0x61, 0xbc, 0x17, 0xd7, 0x68, 0xfd, 0x97, 0x32},
		.aad_length = 12,
		.aad = { 0x00, 0x00, 0x43, 0x21, 0x87, 0x65, 0x43, 0x21,
			 0x00, 0x00, 0x00, 0x00 },
		.digest_length = AES_GCM_DIGEST_LEN,
		.digest = { 0x45, 0x90, 0x18, 0x14, 0x8f, 0x6c, 0xbe, 0x72,
			    0x2f, 0xd0, 0x47, 0x96, 0x56, 0x2d, 0xfd, 0xb4  }
	},
	{
		.cipher_key_length = AES128_KEY_LEN,
		.cipher_key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
				0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08},
		.cipher_iv_length = AES_GCM_IV_LEN,
		.cipher_iv = { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad,
			       0xde, 0xca, 0xf8, 0x88 },
		.length = 64,
		.plaintext = { 0x45, 0x00, 0x00, 0x3e, 0x69, 0x8f, 0x00, 0x00,
			       0x80, 0x11, 0x4d, 0xcc, 0xc0, 0xa8, 0x01, 0x02,
			       0xc0, 0xa8, 0x01, 0x01, 0x0a, 0x98, 0x00, 0x35,
			       0x00, 0x2a, 0x23, 0x43, 0xb2, 0xd0, 0x01, 0x00,
			       0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
			       0x03, 0x73, 0x69, 0x70, 0x09, 0x63, 0x79, 0x62,
			       0x65, 0x72, 0x63, 0x69, 0x74, 0x79, 0x02, 0x64,
			       0x6b, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01 },
		.ciphertext = { 0xde, 0xb2, 0x2c, 0xd9, 0xb0, 0x7c, 0x72, 0xc1,
				0x6e, 0x3a, 0x65, 0xbe, 0xeb, 0x8d, 0xf3, 0x04,
				0xa5, 0xa5, 0x89, 0x7d, 0x33, 0xae, 0x53, 0x0f,
				0x1b, 0xa7, 0x6d, 0x5d, 0x11, 0x4d, 0x2a, 0x5c,
				0x3d, 0xe8, 0x18, 0x27, 0xc1, 0x0e, 0x9a, 0x4f,
				0x51, 0x33, 0x0d, 0x0e, 0xec, 0x41, 0x66, 0x42,
				0xcf, 0xbb, 0x85, 0xa5, 0xb4, 0x7e, 0x48, 0xa4,
				0xec, 0x3b, 0x9b, 0xa9, 0x5d, 0x91, 0x8b, 0xd1},
		.aad_length = 8,
		.aad = { 0x00, 0x00, 0xa5, 0xf8, 0x00, 0x00, 0x00, 0x0a },
		.digest_length = AES_GCM_DIGEST_LEN,
		.digest = { 0x83, 0xb7, 0x0d, 0x3a, 0xa8, 0xbc, 0x6e, 0xe4,
			    0xc3, 0x09, 0xe9, 0xd8, 0x5a, 0x41, 0xad, 0x4a }
	},
	{
		.cipher_key_length = AES128_KEY_LEN,
		.cipher_key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
				0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
		.cipher_iv_length = AES_GCM_IV_LEN,
		.cipher_iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
			       0x00, 0x00, 0x00, 0x00 },
		.length = 64,
		.plaintext = { 0x45, 0x00, 0x00, 0x3c, 0x99, 0xc5, 0x00, 0x00,
			       0x80, 0x01, 0xcb, 0x7a, 0x40, 0x67, 0x93, 0x18,
			       0x01, 0x01, 0x01, 0x01, 0x08, 0x00, 0x07, 0x5c,
			       0x02, 0x00, 0x44, 0x00, 0x61, 0x62, 0x63, 0x64,
			       0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c,
			       0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74,
			       0x75, 0x76, 0x77, 0x61, 0x62, 0x63, 0x64, 0x65,
			       0x66, 0x67, 0x68, 0x69, 0x01, 0x02, 0x02, 0x01 },
		.ciphertext = { 0x46, 0x88, 0xda, 0xf2, 0xf9, 0x73, 0xa3, 0x92,
				0x73, 0x29, 0x09, 0xc3, 0x31, 0xd5, 0x6d, 0x60,
				0xf6, 0x94, 0xab, 0xaa, 0x41, 0x4b, 0x5e, 0x7f,
				0xf5, 0xfd, 0xcd, 0xff, 0xf5, 0xe9, 0xa2, 0x84,
				0x45, 0x64, 0x76, 0x49, 0x27, 0x19, 0xff, 0xb6,
				0x4d, 0xe7, 0xd9, 0xdc, 0xa1, 0xe1, 0xd8, 0x94,
				0xbc, 0x3b, 0xd5, 0x78, 0x73, 0xed, 0x4d, 0x18,
				0x1d, 0x19, 0xd4, 0xd5, 0xc8, 0xc1, 0x8a, 0xf3},
		.aad_length = 8,
		.aad = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 },
		.digest_length = AES_GCM_DIGEST_LEN,
		.digest = { 0xf8, 0x21, 0xd4, 0x96, 0xee, 0xb0, 0x96, 0xe9,
			    0x8a, 0xd2, 0xb6, 0x9e, 0x47, 0x99, 0xc7, 0x1d }
	},
	{
		.cipher_key_length = AES128_KEY_LEN,
		.cipher_key = { 0x3d, 0xe0, 0x98, 0x74, 0xb3, 0x88, 0xe6, 0x49,
				0x19, 0x88, 0xd0, 0xc3, 0x60, 0x7e, 0xae, 0x1f},
		.cipher_iv_length = AES_GCM_IV_LEN,
		.cipher_iv = { 0x57, 0x69, 0x0e, 0x43, 0x4e, 0x28, 0x00, 0x00,
			       0xa2, 0xfc, 0xa1, 0xa3 },
		.length = 28,
		.plaintext = { 0x45, 0x00, 0x00, 0x1c, 0x42, 0xa2, 0x00, 0x00,
			       0x80, 0x01, 0x44, 0x1f, 0x40, 0x67, 0x93, 0xb6,
			       0xe0, 0x00, 0x00, 0x02, 0x0a, 0x00, 0xf5, 0xff,
			       0x01, 0x02, 0x02, 0x01 },
		.ciphertext = { 0xfb, 0xa2, 0xca, 0x84, 0x5e, 0x5d, 0xf9, 0xf0,
				0xf2, 0x2c, 0x3e, 0x6e, 0x86, 0xdd, 0x83, 0x1e,
				0x1f, 0xc6, 0x57, 0x92, 0xcd, 0x1a, 0xf9, 0x13,
				0x0e, 0x13, 0x79, 0xed },
		.aad_length = 12,
		.aad = { 0x42, 0xf6, 0x7e, 0x3f, 0x10, 0x10, 0x10, 0x10,
			 0x10, 0x10, 0x10, 0x10 },
		.digest_length = AES_GCM_DIGEST_LEN,
		.digest = { 0x36, 0x9f, 0x07, 0x1f, 0x35, 0xe0, 0x34, 0xbe,
			    0x95, 0xf1, 0x12, 0xe4, 0xe7, 0xd0, 0x5d, 0x35 }
	},
	{
		.cipher_key_length = AES192_KEY_LEN,
		.cipher_key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
				0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
				0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c},
		.cipher_iv_length = AES_GCM_IV_LEN,
		.cipher_iv = { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad,
			       0xde, 0xca, 0xf8, 0x88 },
		.length = 40,
		.plaintext = { 0x45, 0x00, 0x00, 0x28, 0xa4, 0xad, 0x40, 0x00,
			       0x40, 0x06, 0x78, 0x80, 0x0a, 0x01, 0x03, 0x8f,
			       0x0a, 0x01, 0x06, 0x12, 0x80, 0x23, 0x06, 0xb8,
			       0xcb, 0x71, 0x26, 0x02, 0xdd, 0x6b, 0xb0, 0x3e,
			       0x50, 0x10, 0x16, 0xd0, 0x75, 0x68, 0x00, 0x01 },
		.ciphertext = { 0xa5, 0xb1, 0xf8, 0x06, 0x60, 0x29, 0xae, 0xa4,
				0x0e, 0x59, 0x8b, 0x81, 0x22, 0xde, 0x02, 0x42,
				0x09, 0x38, 0xb3, 0xab, 0x33, 0xf8, 0x28, 0xe6,
				0x87, 0xb8, 0x85, 0x8b, 0x5b, 0xfb, 0xdb, 0xd0,
				0x31, 0x5b, 0x27, 0x45, 0x21, 0x44, 0xcc, 0x77},
		.aad_length = 8,
		.aad = { 0x00, 0x00, 0xa5, 0xf8, 0x00, 0x00, 0x00, 0x0a },
		.digest_length = AES_GCM_DIGEST_LEN,
		.digest = { 0x95, 0x45, 0x7b, 0x96, 0x52, 0x03, 0x7f, 0x53,
			    0x18, 0x02, 0x7b, 0x5b, 0x4c, 0xd7, 0xa6, 0x36 }
	},
	{
		.cipher_key_length = AES256_KEY_LEN,
		.cipher_key = { 0xab, 0xbc, 0xcd, 0xde, 0xf0, 0x01, 0x12, 0x23,
				0x34, 0x45, 0x56, 0x67, 0x78, 0x89, 0x9a, 0xab,
				0xab, 0xbc, 0xcd, 0xde, 0xf0, 0x01, 0x12, 0x23,
				0x34, 0x45, 0x56, 0x67, 0x78, 0x89, 0x9a, 0xab},
		.cipher_iv_length = AES_GCM_IV_LEN,
		.cipher_iv = { 0x11, 0x22, 0x33, 0x44, 0x01, 0x02, 0x03, 0x04,
			       0x05, 0x06, 0x07, 0x08 },
		.length = 52,
		.plaintext = { 0x45, 0x00, 0x00, 0x30, 0x69, 0xa6, 0x40, 0x00,
			       0x80, 0x06, 0x26, 0x90, 0xc0, 0xa8, 0x01, 0x02,
			       0x93, 0x89, 0x15, 0x5e, 0x0a, 0x9e, 0x00, 0x8b,
			       0x2d, 0xc5, 0x7e, 0xe0, 0x00, 0x00, 0x00, 0x00,
			       0x70, 0x02, 0x40, 0x00, 0x20, 0xbf, 0x00, 0x00,
			       0x02, 0x04, 0x05, 0xb4, 0x01, 0x01, 0x04, 0x02,
			       0x01, 0x02, 0x02, 0x01 },
		.ciphertext = { 0xff, 0x42, 0x5c, 0x9b, 0x72, 0x45, 0x99, 0xdf,
				0x7a, 0x3b, 0xcd, 0x51, 0x01, 0x94, 0xe0, 0x0d,
				0x6a, 0x78, 0x10, 0x7f, 0x1b, 0x0b, 0x1c, 0xbf,
				0x06, 0xef, 0xae, 0x9d, 0x65, 0xa5, 0xd7, 0x63,
				0x74, 0x8a, 0x63, 0x79, 0x85, 0x77, 0x1d, 0x34,
				0x7f, 0x05, 0x45, 0x65, 0x9f, 0x14, 0xe9, 0x9d,
				0xef, 0x84, 0x2d, 0x8e },
		.aad_length = 8,
		.aad = { 0x4a, 0x2c, 0xbf, 0xe3, 0x00, 0x00, 0x00, 0x02 },
		.digest_length = AES_GCM_DIGEST_LEN,
		.digest = { 0xb3, 0x35, 0xf4, 0xee, 0xcf, 0xdb, 0xf8, 0x31,
			    0x82, 0x4b, 0x4c, 0x49, 0x15, 0x95, 0x6c, 0x96 }
	}
};

static crypto_test_reference_t aes_ccm_reference[] = {
	/*
	 * AES-CCM reference from RFC 3610
	 */
	{
		.cipher_key_length = AES128_KEY_LEN,
		.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
				0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf},
		.cipher_iv_length = 13,
		.cipher_iv = { 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0xa0,
			       0xa1, 0xa2, 0xa3, 0xa4, 0xa5 },
		.aad_length = 8,
		.aad = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 },
		.length = 23,
		.plaintext = { 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
			       0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
			       0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e },
		.ciphertext = { 0x58, 0x8c, 0x97, 0x9a, 0x61, 0xc6, 0x63, 0xd2,
				0xf0, 0x66, 0xd0, 0xc2, 0xc0, 0xf9, 0x89, 0x80,
				0x6d, 0x5f, 0x6b, 0x61, 0xda, 0xc3, 0x84 },
		.digest_length = 8,
		.digest = { 0x17, 0xe8, 0xd1, 0x2c, 0xfd, 0xf9, 0x26, 0xe0 }
	},
	/* The rest of test vectors are generated manually, no "interesting"
	 * vectors for use cases in RFC 3610 or SP 800-38C. */
	{
		.cipher_key_length = AES192_KEY_LEN,
		.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
				0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
				0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7},
		.cipher_iv_length = 13,
		.cipher_iv = { 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0xa0,
			       0xa1, 0xa2, 0xa3, 0xa4, 0xa5 },
		.aad_length = 8,
		.aad = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 },
		.length = 23,
		.plaintext = { 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
			       0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
			       0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e },
		.ciphertext = { 0x57, 0x9f, 0xb8, 0x6e, 0xdd, 0xb4, 0xa6, 0x4a,
				0xae, 0x5f, 0xe9, 0x6d, 0xbd, 0x75, 0x44, 0x05,
				0x33, 0xa9, 0xfc, 0x3a, 0x84, 0x57, 0x36 },
		.digest_length = 8,
		.digest = { 0x67, 0xae, 0xc8, 0x0a, 0xc5, 0x88, 0xab, 0x16 }
	},
	{
		.cipher_key_length = AES256_KEY_LEN,
		.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
				0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
				0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
				0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf},
		.cipher_iv_length = 13,
		.cipher_iv = { 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0xa0,
			       0xa1, 0xa2, 0xa3, 0xa4, 0xa5 },
		.aad_length = 8,
		.aad = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 },
		.length = 23,
		.plaintext = { 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
			       0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
			       0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e },
		.ciphertext = { 0x59, 0x61, 0x55, 0x10, 0xa7, 0xc4, 0x3b, 0xfb,
				0x12, 0x3d, 0x63, 0x6b, 0x46, 0x13, 0xc0, 0x3c,
				0x6c, 0xe2, 0x69, 0x07, 0x10, 0x2a, 0x3f },
		.digest_length = 8,
		.digest = { 0xb5, 0x57, 0x2a, 0x17, 0x2d, 0x49, 0x16, 0xd5 }
	},
	{
		.cipher_key_length = AES128_KEY_LEN,
		.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
				0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf},
		.cipher_iv_length = 11,
		.cipher_iv = { 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0xa0,
			       0xa1, 0xa2, 0xa3 },
		.aad_length = 8,
		.aad = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 },
		.length = 23,
		.plaintext = { 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
			       0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
			       0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e },
		.ciphertext = { 0xaa, 0x2d, 0x3e, 0xcb, 0xa6, 0x68, 0x63, 0x75,
				0x8f, 0x03, 0x01, 0x51, 0x16, 0xde, 0x30, 0xed,
				0x8a, 0xb5, 0x42, 0xdc, 0xfa, 0x72, 0xd0 },
		.digest_length = 8,
		.digest = { 0x63, 0xe7, 0x01, 0x5c, 0x69, 0xaf, 0xb4, 0x0c }
	},
	{
		.cipher_key_length = AES192_KEY_LEN,
		.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
				0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
				0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7},
		.cipher_iv_length = 11,
		.cipher_iv = { 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0xa0,
			       0xa1, 0xa2, 0xa3 },
		.aad_length = 8,
		.aad = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 },
		.length = 23,
		.plaintext = { 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
			       0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
			       0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e },
		.ciphertext = { 0xee, 0x99, 0x99, 0x1e, 0xc5, 0x8f, 0xd7, 0x7e,
				0x56, 0x71, 0x16, 0x39, 0x8e, 0xc4, 0x4f, 0xcc,
				0x14, 0x45, 0x57, 0x3e, 0x38, 0x76, 0x51 },
		.digest_length = 8,
		.digest = { 0x31, 0x29, 0x47, 0xa4, 0x6d, 0x76, 0x34, 0xb4 }
	},
	{
		.cipher_key_length = AES256_KEY_LEN,
		.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
				0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
				0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
				0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf},
		.cipher_iv_length = 11,
		.cipher_iv = { 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0xa0,
			       0xa1, 0xa2, 0xa3 },
		.aad_length = 8,
		.aad = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 },
		.length = 23,
		.plaintext = { 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
			       0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
			       0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e },
		.ciphertext = { 0xfa, 0x07, 0x47, 0x5c, 0xe8, 0xc9, 0x37, 0x88,
				0x54, 0x64, 0xb8, 0xc3, 0x85, 0xbb, 0x76, 0x0b,
				0xf2, 0xc2, 0x4c, 0x4e, 0x31, 0x16, 0x77 },
		.digest_length = 8,
		.digest = { 0x88, 0x56, 0x7e, 0x19, 0x84, 0x13, 0x29, 0xc4 }
	},
};

static crypto_test_reference_t aes_gmac_reference[] = {
	{
		.auth_key_length = AES128_KEY_LEN,
		.auth_key = { 0x4c, 0x80, 0xcd, 0xef, 0xbb, 0x5d, 0x10, 0xda,
			      0x90, 0x6a, 0xc7, 0x3c, 0x36, 0x13, 0xa6, 0x34},
		.auth_iv_length = AES_GCM_IV_LEN,
		.auth_iv = { 0x22, 0x43, 0x3c, 0x64, 0x00, 0x00, 0x00, 0x00,
			     0x00, 0x00, 0x00, 0x00 },
		.length = 68,
		.plaintext = { 0x00, 0x00, 0x43, 0x21, 0x00, 0x00, 0x00, 0x07,
			       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
			       0x45, 0x00, 0x00, 0x30, 0xda, 0x3a, 0x00, 0x00,
			       0x80, 0x01, 0xdf, 0x3b, 0xc0, 0xa8, 0x00, 0x05,
			       0xc0, 0xa8, 0x00, 0x01, 0x08, 0x00, 0xc6, 0xcd,
			       0x02, 0x00, 0x07, 0x00, 0x61, 0x62, 0x63, 0x64,
			       0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c,
			       0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74,
			       0x01, 0x02, 0x02, 0x01 },
		.ciphertext = { 0x00, 0x00, 0x43, 0x21, 0x00, 0x00, 0x00, 0x07,
				0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
				0x45, 0x00, 0x00, 0x30, 0xda, 0x3a, 0x00, 0x00,
				0x80, 0x01, 0xdf, 0x3b, 0xc0, 0xa8, 0x00, 0x05,
				0xc0, 0xa8, 0x00, 0x01, 0x08, 0x00, 0xc6, 0xcd,
				0x02, 0x00, 0x07, 0x00, 0x61, 0x62, 0x63, 0x64,
				0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c,
				0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74,
				0x01, 0x02, 0x02, 0x01 },
		.digest_length = AES_GCM_DIGEST_LEN,
		.digest = { 0xf2, 0xa9, 0xa8, 0x36, 0xe1, 0x55, 0x10, 0x6a,
			    0xa8, 0xdc, 0xd6, 0x18, 0xe4, 0x09, 0x9a, 0xaa }
	},
	/* AES192-GMAC from DPDK 17.02 */
	{
		.auth_key_length = AES192_KEY_LEN,
		.auth_key = { 0xaa, 0x74, 0x0a, 0xbf, 0xad, 0xcd, 0xa7, 0x79,
			      0x22, 0x0d, 0x3b, 0x40, 0x6c, 0x5d, 0x7e, 0xc0,
			      0x9a, 0x77, 0xfe, 0x9d, 0x94, 0x10, 0x45, 0x39},
		.auth_iv_length = AES_GCM_IV_LEN,
		.auth_iv = { 0xab, 0x22, 0x65, 0xb4, 0xc1, 0x68, 0x95, 0x55,
			     0x61, 0xf0, 0x43, 0x15 },
		.length = 80,
		.plaintext = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
			       0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
			       0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
			       0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
			       0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
			       0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
			       0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
			       0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
			       0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
			       0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10},
		.ciphertext = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
				0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
				0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
				0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
				0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
				0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
				0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
				0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
				0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
				0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10},
		.digest_length = AES_GCM_DIGEST_LEN,
		.digest = { 0xCF, 0x82, 0x80, 0x64, 0x02, 0x46, 0xF4, 0xFB,
			    0x33, 0xAE, 0x1D, 0x90, 0xEA, 0x48, 0x83, 0xDB },
	},
	/* AES256-GMAC from DPDK 17.02 */
	{
		.auth_key_length = AES256_KEY_LEN,
		.auth_key = { 0xb5, 0x48, 0xe4, 0x93, 0x4f, 0x5c, 0x64, 0xd3,
			      0xc0, 0xf0, 0xb7, 0x8f, 0x7b, 0x4d, 0x88, 0x24,
			      0xaa, 0xc4, 0x6b, 0x3c, 0x8d, 0x2c, 0xc3, 0x5e,
			      0xe4, 0xbf, 0xb2, 0x54, 0xe4, 0xfc, 0xba, 0xf7},
		.auth_iv_length = AES_GCM_IV_LEN,
		.auth_iv = { 0x2e, 0xed, 0xe1, 0xdc, 0x64, 0x47, 0xc7, 0xaf,
			     0xc4, 0x41, 0x53, 0x58 },
		.length = 65,
		.plaintext = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
			       0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
			       0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
			       0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
			       0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
			       0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
			       0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
			       0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
			       0x01, 0x02 },
		.ciphertext = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
				0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
				0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
				0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
				0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
				0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
				0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
				0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
				0x01, 0x02 },
		.digest_length = AES_GCM_DIGEST_LEN,
		.digest = { 0x77, 0x46, 0x0D, 0x6F, 0xB1, 0x87, 0xDB, 0xA9,
			    0x46, 0xAD, 0xCD, 0xFB, 0xB7, 0xF9, 0x13, 0xA1 },
	}
};

/*
 * Test vectors from SP800-38B / CSRC examples
 * 12-byte vectors are just truncated 16-byte vectors
 */
static crypto_test_reference_t aes_cmac_reference[] = {
	{
		.auth_key_length = AES128_KEY_LEN,
		.auth_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
			      0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c },
		.length = 16,
		.plaintext = { 0x6b, 0xc1, 0xbe, 0xe2,  0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11,  0x73, 0x93, 0x17, 0x2a},
		.ciphertext = { 0x6b, 0xc1, 0xbe, 0xe2,  0x2e, 0x40, 0x9f, 0x96,
				0xe9, 0x3d, 0x7e, 0x11,  0x73, 0x93, 0x17, 0x2a
		},
		.digest_length = 16,
		.digest = { 0x07, 0x0a, 0x16, 0xb4, 0x6b, 0x4d, 0x41, 0x44,
			    0xf7, 0x9b, 0xdd, 0x9d, 0xd0, 0x4a, 0x28, 0x7c },
	},
	{
		.auth_key_length = AES192_KEY_LEN,
		.auth_key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
			      0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
			      0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b },
		.length = 16,
		.plaintext = { 0x6b, 0xc1, 0xbe, 0xe2,  0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11,  0x73, 0x93, 0x17, 0x2a},
		.ciphertext = { 0x6b, 0xc1, 0xbe, 0xe2,  0x2e, 0x40, 0x9f, 0x96,
				0xe9, 0x3d, 0x7e, 0x11,  0x73, 0x93, 0x17, 0x2a
		},
		.digest_length = 16,
		.digest = { 0x9e, 0x99, 0xa7, 0xbf, 0x31, 0xe7, 0x10, 0x90,
			    0x06, 0x62, 0xf6, 0x5e, 0x61, 0x7c, 0x51, 0x84 },
	},
	{
		.auth_key_length = AES256_KEY_LEN,
		.auth_key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
			      0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
			      0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7,
			      0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4 },
		.length = 16,
		.plaintext = { 0x6b, 0xc1, 0xbe, 0xe2,  0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11,  0x73, 0x93, 0x17, 0x2a},
		.ciphertext = { 0x6b, 0xc1, 0xbe, 0xe2,  0x2e, 0x40, 0x9f, 0x96,
				0xe9, 0x3d, 0x7e, 0x11,  0x73, 0x93, 0x17, 0x2a
		},
		.digest_length = 16,
		.digest = { 0x28, 0xa7, 0x02, 0x3f, 0x45, 0x2e, 0x8f, 0x82,
			    0xbd, 0x4b, 0xf2, 0x8d, 0x8c, 0x37, 0xc3, 0x5c },
	},
	{
		.auth_key_length = AES128_KEY_LEN,
		.auth_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
			      0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c },
		.length = 16,
		.plaintext = { 0x6b, 0xc1, 0xbe, 0xe2,  0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11,  0x73, 0x93, 0x17, 0x2a},
		.ciphertext = { 0x6b, 0xc1, 0xbe, 0xe2,  0x2e, 0x40, 0x9f, 0x96,
				0xe9, 0x3d, 0x7e, 0x11,  0x73, 0x93, 0x17, 0x2a
		},
		.digest_length = 12,
		.digest = { 0x07, 0x0a, 0x16, 0xb4, 0x6b, 0x4d, 0x41, 0x44,
			    0xf7, 0x9b, 0xdd, 0x9d },
	},
	{
		.auth_key_length = AES192_KEY_LEN,
		.auth_key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
			      0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
			      0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b },
		.length = 16,
		.plaintext = { 0x6b, 0xc1, 0xbe, 0xe2,  0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11,  0x73, 0x93, 0x17, 0x2a},
		.ciphertext = { 0x6b, 0xc1, 0xbe, 0xe2,  0x2e, 0x40, 0x9f, 0x96,
				0xe9, 0x3d, 0x7e, 0x11,  0x73, 0x93, 0x17, 0x2a
		},
		.digest_length = 12,
		.digest = { 0x9e, 0x99, 0xa7, 0xbf, 0x31, 0xe7, 0x10, 0x90,
			    0x06, 0x62, 0xf6, 0x5e },
	},
	{
		.auth_key_length = AES256_KEY_LEN,
		.auth_key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
			      0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
			      0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7,
			      0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4 },
		.length = 16,
		.plaintext = { 0x6b, 0xc1, 0xbe, 0xe2,  0x2e, 0x40, 0x9f, 0x96,
			       0xe9, 0x3d, 0x7e, 0x11,  0x73, 0x93, 0x17, 0x2a},
		.ciphertext = { 0x6b, 0xc1, 0xbe, 0xe2,  0x2e, 0x40, 0x9f, 0x96,
				0xe9, 0x3d, 0x7e, 0x11,  0x73, 0x93, 0x17, 0x2a
		},
		.digest_length = 12,
		.digest = { 0x28, 0xa7, 0x02, 0x3f, 0x45, 0x2e, 0x8f, 0x82,
			    0xbd, 0x4b, 0xf2, 0x8d },
	}
};

/*
 * Test vector from RFC 7539, sections 2.8.2, A.5
 */
static crypto_test_reference_t chacha20_poly1305_reference[] = {
	{
		.cipher_key_length = CHACHA20_POLY1305_KEY_LEN,
		.cipher_key = { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
				0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
				0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
				0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f},
		.cipher_iv_length = CHACHA20_POLY1305_IV_LEN,
		.cipher_iv = { 0x07, 0x00, 0x00, 0x00, 0x40, 0x41, 0x42, 0x43,
			       0x44, 0x45, 0x46, 0x47 },
		.length = 114,
		.plaintext = { 0x4c, 0x61, 0x64, 0x69, 0x65, 0x73, 0x20, 0x61,
			       0x6e, 0x64, 0x20, 0x47, 0x65, 0x6e, 0x74, 0x6c,
			       0x65, 0x6d, 0x65, 0x6e, 0x20, 0x6f, 0x66, 0x20,
			       0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x61, 0x73,
			       0x73, 0x20, 0x6f, 0x66, 0x20, 0x27, 0x39, 0x39,
			       0x3a, 0x20, 0x49, 0x66, 0x20, 0x49, 0x20, 0x63,
			       0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6f, 0x66, 0x66,
			       0x65, 0x72, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6f,
			       0x6e, 0x6c, 0x79, 0x20, 0x6f, 0x6e, 0x65, 0x20,
			       0x74, 0x69, 0x70, 0x20, 0x66, 0x6f, 0x72, 0x20,
			       0x74, 0x68, 0x65, 0x20, 0x66, 0x75, 0x74, 0x75,
			       0x72, 0x65, 0x2c, 0x20, 0x73, 0x75, 0x6e, 0x73,
			       0x63, 0x72, 0x65, 0x65, 0x6e, 0x20, 0x77, 0x6f,
			       0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x69,
			       0x74, 0x2e },
		.ciphertext = { 0xd3, 0x1a, 0x8d, 0x34, 0x64, 0x8e, 0x60, 0xdb,
				0x7b, 0x86, 0xaf, 0xbc, 0x53, 0xef, 0x7e, 0xc2,
				0xa4, 0xad, 0xed, 0x51, 0x29, 0x6e, 0x08, 0xfe,
				0xa9, 0xe2, 0xb5, 0xa7, 0x36, 0xee, 0x62, 0xd6,
				0x3d, 0xbe, 0xa4, 0x5e, 0x8c, 0xa9, 0x67, 0x12,
				0x82, 0xfa, 0xfb, 0x69, 0xda, 0x92, 0x72, 0x8b,
				0x1a, 0x71, 0xde, 0x0a, 0x9e, 0x06, 0x0b, 0x29,
				0x05, 0xd6, 0xa5, 0xb6, 0x7e, 0xcd, 0x3b, 0x36,
				0x92, 0xdd, 0xbd, 0x7f, 0x2d, 0x77, 0x8b, 0x8c,
				0x98, 0x03, 0xae, 0xe3, 0x28, 0x09, 0x1b, 0x58,
				0xfa, 0xb3, 0x24, 0xe4, 0xfa, 0xd6, 0x75, 0x94,
				0x55, 0x85, 0x80, 0x8b, 0x48, 0x31, 0xd7, 0xbc,
				0x3f, 0xf4, 0xde, 0xf0, 0x8e, 0x4b, 0x7a, 0x9d,
				0xe5, 0x76, 0xd2, 0x65, 0x86, 0xce, 0xc6, 0x4b,
				0x61, 0x16 },
		.aad_length = 12,
		.aad = { 0x50, 0x51, 0x52, 0x53, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4,
			 0xc5, 0xc6, 0xc7 },
		.digest_length = 16,
		.digest = { 0x1a, 0xe1, 0x0b, 0x59, 0x4f, 0x09, 0xe2, 0x6a,
			    0x7e, 0x90, 0x2e, 0xcb, 0xd0, 0x60, 0x06, 0x91 }
	},
	{
		.cipher_key_length = CHACHA20_POLY1305_KEY_LEN,
		.cipher_key = { 0x1c, 0x92, 0x40, 0xa5, 0xeb, 0x55, 0xd3, 0x8a,
				0xf3, 0x33, 0x88, 0x86, 0x04, 0xf6, 0xb5, 0xf0,
				0x47, 0x39, 0x17, 0xc1, 0x40, 0x2b, 0x80, 0x09,
				0x9d, 0xca, 0x5c, 0xbc, 0x20, 0x70, 0x75, 0xc0},
		.cipher_iv_length = CHACHA20_POLY1305_IV_LEN,
		.cipher_iv = { 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04,
			       0x05, 0x06, 0x07, 0x08 },
		.length = 265,
		.plaintext = { 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74,
			       0x2d, 0x44, 0x72, 0x61, 0x66, 0x74, 0x73, 0x20,
			       0x61, 0x72, 0x65, 0x20, 0x64, 0x72, 0x61, 0x66,
			       0x74, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65,
			       0x6e, 0x74, 0x73, 0x20, 0x76, 0x61, 0x6c, 0x69,
			       0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20,
			       0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x20,
			       0x6f, 0x66, 0x20, 0x73, 0x69, 0x78, 0x20, 0x6d,
			       0x6f, 0x6e, 0x74, 0x68, 0x73, 0x20, 0x61, 0x6e,
			       0x64, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65,
			       0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64,
			       0x2c, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63,
			       0x65, 0x64, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x6f,
			       0x62, 0x73, 0x6f, 0x6c, 0x65, 0x74, 0x65, 0x64,
			       0x20, 0x62, 0x79, 0x20, 0x6f, 0x74, 0x68, 0x65,
			       0x72, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65,
			       0x6e, 0x74, 0x73, 0x20, 0x61, 0x74, 0x20, 0x61,
			       0x6e, 0x79, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x2e,
			       0x20, 0x49, 0x74, 0x20, 0x69, 0x73, 0x20, 0x69,
			       0x6e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72,
			       0x69, 0x61, 0x74, 0x65, 0x20, 0x74, 0x6f, 0x20,
			       0x75, 0x73, 0x65, 0x20, 0x49, 0x6e, 0x74, 0x65,
			       0x72, 0x6e, 0x65, 0x74, 0x2d, 0x44, 0x72, 0x61,
			       0x66, 0x74, 0x73, 0x20, 0x61, 0x73, 0x20, 0x72,
			       0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
			       0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61,
			       0x6c, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x6f, 0x20,
			       0x63, 0x69, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65,
			       0x6d, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20,
			       0x74, 0x68, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x20,
			       0x2f, 0xe2, 0x80, 0x9c, 0x77, 0x6f, 0x72, 0x6b,
			       0x20, 0x69, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x67,
			       0x72, 0x65, 0x73, 0x73, 0x2e, 0x2f, 0xe2, 0x80,
			       0x9d },
		.ciphertext = { 0x64, 0xa0, 0x86, 0x15, 0x75, 0x86, 0x1a, 0xf4,
				0x60, 0xf0, 0x62, 0xc7, 0x9b, 0xe6, 0x43, 0xbd,
				0x5e, 0x80, 0x5c, 0xfd, 0x34, 0x5c, 0xf3, 0x89,
				0xf1, 0x08, 0x67, 0x0a, 0xc7, 0x6c, 0x8c, 0xb2,
				0x4c, 0x6c, 0xfc, 0x18, 0x75, 0x5d, 0x43, 0xee,
				0xa0, 0x9e, 0xe9, 0x4e, 0x38, 0x2d, 0x26, 0xb0,
				0xbd, 0xb7, 0xb7, 0x3c, 0x32, 0x1b, 0x01, 0x00,
				0xd4, 0xf0, 0x3b, 0x7f, 0x35, 0x58, 0x94, 0xcf,
				0x33, 0x2f, 0x83, 0x0e, 0x71, 0x0b, 0x97, 0xce,
				0x98, 0xc8, 0xa8, 0x4a, 0xbd, 0x0b, 0x94, 0x81,
				0x14, 0xad, 0x17, 0x6e, 0x00, 0x8d, 0x33, 0xbd,
				0x60, 0xf9, 0x82, 0xb1, 0xff, 0x37, 0xc8, 0x55,
				0x97, 0x97, 0xa0, 0x6e, 0xf4, 0xf0, 0xef, 0x61,
				0xc1, 0x86, 0x32, 0x4e, 0x2b, 0x35, 0x06, 0x38,
				0x36, 0x06, 0x90, 0x7b, 0x6a, 0x7c, 0x02, 0xb0,
				0xf9, 0xf6, 0x15, 0x7b, 0x53, 0xc8, 0x67, 0xe4,
				0xb9, 0x16, 0x6c, 0x76, 0x7b, 0x80, 0x4d, 0x46,
				0xa5, 0x9b, 0x52, 0x16, 0xcd, 0xe7, 0xa4, 0xe9,
				0x90, 0x40, 0xc5, 0xa4, 0x04, 0x33, 0x22, 0x5e,
				0xe2, 0x82, 0xa1, 0xb0, 0xa0, 0x6c, 0x52, 0x3e,
				0xaf, 0x45, 0x34, 0xd7, 0xf8, 0x3f, 0xa1, 0x15,
				0x5b, 0x00, 0x47, 0x71, 0x8c, 0xbc, 0x54, 0x6a,
				0x0d, 0x07, 0x2b, 0x04, 0xb3, 0x56, 0x4e, 0xea,
				0x1b, 0x42, 0x22, 0x73, 0xf5, 0x48, 0x27, 0x1a,
				0x0b, 0xb2, 0x31, 0x60, 0x53, 0xfa, 0x76, 0x99,
				0x19, 0x55, 0xeb, 0xd6, 0x31, 0x59, 0x43, 0x4e,
				0xce, 0xbb, 0x4e, 0x46, 0x6d, 0xae, 0x5a, 0x10,
				0x73, 0xa6, 0x72, 0x76, 0x27, 0x09, 0x7a, 0x10,
				0x49, 0xe6, 0x17, 0xd9, 0x1d, 0x36, 0x10, 0x94,
				0xfa, 0x68, 0xf0, 0xff, 0x77, 0x98, 0x71, 0x30,
				0x30, 0x5b, 0xea, 0xba, 0x2e, 0xda, 0x04, 0xdf,
				0x99, 0x7b, 0x71, 0x4d, 0x6c, 0x6f, 0x2c, 0x29,
				0xa6, 0xad, 0x5c, 0xb4, 0x02, 0x2b, 0x02, 0x70,
				0x9b },
		.aad_length = 12,
		.aad = { 0xf3, 0x33, 0x88, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00,
			 0x00, 0x4e, 0x91 },
		.digest_length = CHACHA20_POLY1305_CHECK_LEN,
		.digest = { 0xee, 0xad, 0x9d, 0x67, 0x89, 0x0c, 0xbb, 0x22,
			    0x39, 0x23, 0x36, 0xfe, 0xa1, 0x85, 0x1f, 0x38 }
	},
};

static crypto_test_reference_t hmac_md5_reference[] = {
	{
		.auth_key_length = HMAC_MD5_KEY_LEN,
		.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b },
		.length = 8,
		/* "Hi There" */
		.plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.ciphertext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.digest_length = HMAC_MD5_96_CHECK_LEN,
		.digest = { 0x92, 0x94, 0x72, 0x7a, 0x36, 0x38, 0xbb, 0x1c,
			    0x13, 0xf4, 0x8e, 0xf8 },

	},
	{
		.auth_key_length = HMAC_MD5_KEY_LEN,
		/* "Jefe" */
		.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
		.length = 28,
		/* what do ya want for nothing?*/
		.plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
			       0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
			       0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
			       0x69, 0x6e, 0x67, 0x3f },
		.ciphertext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
				0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
				0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
				0x69, 0x6e, 0x67, 0x3f },
		.digest_length = HMAC_MD5_96_CHECK_LEN,
		.digest = { 0x75, 0x0c, 0x78, 0x3e, 0x6a, 0xb0, 0xb5, 0x03,
			    0xea, 0xa8, 0x6e, 0x31 },

	},
	{
		.auth_key_length = HMAC_MD5_KEY_LEN,
		.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa },
		.length = 50,
		.plaintext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd },
		.ciphertext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd },
		.digest_length = HMAC_MD5_96_CHECK_LEN,
		.digest = { 0x56, 0xbe, 0x34, 0x52, 0x1d, 0x14, 0x4c, 0x88,
			    0xdb, 0xb8, 0xc7, 0x33 }
	},
	{
		.auth_key_length = HMAC_MD5_KEY_LEN,
		.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b },
		.length = 8,
		/* "Hi There" */
		.plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.ciphertext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.digest_length = HMAC_MD5_CHECK_LEN,
		.digest = { 0x92, 0x94, 0x72, 0x7a, 0x36, 0x38, 0xbb, 0x1c,
			    0x13, 0xf4, 0x8e, 0xf8, 0x15, 0x8b, 0xfc, 0x9d },

	},
	{
		.auth_key_length = HMAC_MD5_KEY_LEN,
		/* "Jefe" */
		.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
		.length = 28,
		/* what do ya want for nothing?*/
		.plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
			       0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
			       0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
			       0x69, 0x6e, 0x67, 0x3f },
		.ciphertext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
				0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
				0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
				0x69, 0x6e, 0x67, 0x3f },
		.digest_length = HMAC_MD5_CHECK_LEN,
		.digest = { 0x75, 0x0c, 0x78, 0x3e, 0x6a, 0xb0, 0xb5, 0x03,
			    0xea, 0xa8, 0x6e, 0x31, 0x0a, 0x5d, 0xb7, 0x38 },

	},
	{
		.auth_key_length = HMAC_MD5_KEY_LEN,
		.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa },
		.length = 50,
		.plaintext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd },
		.ciphertext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd },
		.digest_length = HMAC_MD5_CHECK_LEN,
		.digest = { 0x56, 0xbe, 0x34, 0x52, 0x1d, 0x14, 0x4c, 0x88,
			    0xdb, 0xb8, 0xc7, 0x33, 0xf0, 0xe8, 0xb3, 0xf6 }
	}
};

static crypto_test_reference_t hmac_sha1_reference[] = {
	{
		.auth_key_length = HMAC_SHA1_KEY_LEN,
		.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b },
		.length = 8,
		/* "Hi There" */
		.plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.ciphertext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.digest_length = HMAC_SHA1_96_CHECK_LEN,
		.digest = { 0xb6, 0x17, 0x31, 0x86, 0x55, 0x05,
			    0x72, 0x64, 0xe2, 0x8b, 0xc0, 0xb6 }
	},
	{
		.auth_key_length = HMAC_SHA1_KEY_LEN,
		/* "Jefe" */
		.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
		.length = 28,
		/* what do ya want for nothing?*/
		.plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
			       0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
			       0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
			       0x69, 0x6e, 0x67, 0x3f },
		.ciphertext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
				0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
				0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
				0x69, 0x6e, 0x67, 0x3f },
		.digest_length = HMAC_SHA1_96_CHECK_LEN,
		.digest = { 0xef, 0xfc, 0xdf, 0x6a, 0xe5, 0xeb,
			    0x2f, 0xa2, 0xd2, 0x74, 0x16, 0xd5 }
	},
	{
		.auth_key_length = HMAC_SHA1_KEY_LEN,
		.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa },
		.length = 50,
		.plaintext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd },
		.ciphertext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd },
		.digest_length = HMAC_SHA1_96_CHECK_LEN,
		.digest = { 0x12, 0x5d, 0x73, 0x42, 0xb9, 0xac,
			    0x11, 0xcd, 0x91, 0xa3, 0x9a, 0xf4 }
	},
	{
		.auth_key_length = HMAC_SHA1_KEY_LEN,
		.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b },
		.length = 8,
		/* "Hi There" */
		.plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.ciphertext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.digest_length = HMAC_SHA1_CHECK_LEN,
		.digest = { 0xb6, 0x17, 0x31, 0x86, 0x55, 0x05, 0x72, 0x64,
			    0xe2, 0x8b, 0xc0, 0xb6, 0xfb, 0x37, 0x8c, 0x8e,
			    0xf1, 0x46, 0xbe, 0x00 }
	},
	{
		.auth_key_length = HMAC_SHA1_KEY_LEN,
		/* "Jefe" */
		.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
		.length = 28,
		/* what do ya want for nothing?*/
		.plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
			       0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
			       0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
			       0x69, 0x6e, 0x67, 0x3f },
		.ciphertext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
				0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
				0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
				0x69, 0x6e, 0x67, 0x3f },
		.digest_length = HMAC_SHA1_CHECK_LEN,
		.digest = { 0xef, 0xfc, 0xdf, 0x6a, 0xe5, 0xeb, 0x2f, 0xa2,
			    0xd2, 0x74, 0x16, 0xd5, 0xf1, 0x84, 0xdf, 0x9c,
			    0x25, 0x9a, 0x7c, 0x79 }
	},
	{
		.auth_key_length = HMAC_SHA1_KEY_LEN,
		.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa },
		.length = 50,
		.plaintext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd },
		.ciphertext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd },
		.digest_length = HMAC_SHA1_CHECK_LEN,
		.digest = { 0x12, 0x5d, 0x73, 0x42, 0xb9, 0xac, 0x11, 0xcd,
			    0x91, 0xa3, 0x9a, 0xf4, 0x8a, 0xa1, 0x7b, 0x4f,
			    0x63, 0xf1, 0x75, 0xd3 }
	}
};

static crypto_test_reference_t hmac_sha224_reference[] = {
	{
		.auth_key_length = HMAC_SHA224_KEY_LEN,
		.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b },
		.length = 8,
		/* "Hi There" */
		.plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.ciphertext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.digest_length = HMAC_SHA224_CHECK_LEN,
		.digest = { 0x89, 0x6f, 0xb1, 0x12, 0x8a, 0xbb, 0xdf, 0x19,
			    0x68, 0x32, 0x10, 0x7c, 0xd4, 0x9d, 0xf3, 0x3f,
			    0x47, 0xb4, 0xb1, 0x16, 0x99, 0x12, 0xba, 0x4f,
			    0x53, 0x68, 0x4b, 0x22 }
	},
	{
		.auth_key_length = HMAC_SHA224_KEY_LEN,
		/* "Jefe" */
		.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
		.length = 28,
		/* what do ya want for nothing?*/
		.plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
			       0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
			       0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
			       0x69, 0x6e, 0x67, 0x3f },
		.ciphertext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
				0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
				0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
				0x69, 0x6e, 0x67, 0x3f },
		.digest_length = HMAC_SHA224_CHECK_LEN,
		.digest = { 0xa3, 0x0e, 0x01, 0x09, 0x8b, 0xc6, 0xdb, 0xbf,
			    0x45, 0x69, 0x0f, 0x3a, 0x7e, 0x9e, 0x6d, 0x0f,
			    0x8b, 0xbe, 0xa2, 0xa3, 0x9e, 0x61, 0x48, 0x00,
			    0x8f, 0xd0, 0x5e, 0x44 }
	},
	{
		.auth_key_length = HMAC_SHA224_KEY_LEN,
		.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa },
		.length = 50,
		.plaintext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd },
		.ciphertext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd },
		.digest_length = HMAC_SHA224_CHECK_LEN,
		.digest = { 0x7f, 0xb3, 0xcb, 0x35, 0x88, 0xc6, 0xc1, 0xf6,
			    0xff, 0xa9, 0x69, 0x4d, 0x7d, 0x6a, 0xd2, 0x64,
			    0x93, 0x65, 0xb0, 0xc1, 0xf6, 0x5d, 0x69, 0xd1,
			    0xec, 0x83, 0x33, 0xea }
	}
};

static crypto_test_reference_t hmac_sha256_reference[] = {
	{
		.auth_key_length = HMAC_SHA256_KEY_LEN,
		.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b },
		.length = 8,
		/* "Hi There" */
		.plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.ciphertext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.digest_length = HMAC_SHA256_128_CHECK_LEN,
		.digest = { 0xb0, 0x34, 0x4c, 0x61, 0xd8, 0xdb, 0x38, 0x53,
			    0x5c, 0xa8, 0xaf, 0xce, 0xaf, 0x0b, 0xf1, 0x2b }
	},
	{
		.auth_key_length = HMAC_SHA256_KEY_LEN,
		/* "Jefe" */
		.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
		.length = 28,
		/* what do ya want for nothing?*/
		.plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
			       0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
			       0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
			       0x69, 0x6e, 0x67, 0x3f },
		.ciphertext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
				0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
				0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
				0x69, 0x6e, 0x67, 0x3f },
		.digest_length = HMAC_SHA256_128_CHECK_LEN,
		.digest = { 0x5b, 0xdc, 0xc1, 0x46, 0xbf, 0x60, 0x75, 0x4e,
			    0x6a, 0x04, 0x24, 0x26, 0x08, 0x95, 0x75, 0xc7 }
	},
	{
		.auth_key_length = HMAC_SHA256_KEY_LEN,
		.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa },
		.length = 50,
		.plaintext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd },
		.ciphertext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd },
		.digest_length = HMAC_SHA256_128_CHECK_LEN,
		.digest = { 0x77, 0x3e, 0xa9, 0x1e, 0x36, 0x80, 0x0e, 0x46,
			    0x85, 0x4d, 0xb8, 0xeb, 0xd0, 0x91, 0x81, 0xa7 }
	},
	{
		.auth_key_length = HMAC_SHA256_KEY_LEN,
		.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b },
		.length = 8,
		/* "Hi There" */
		.plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.ciphertext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.digest_length = HMAC_SHA256_CHECK_LEN,
		.digest = { 0xb0, 0x34, 0x4c, 0x61, 0xd8, 0xdb, 0x38, 0x53,
			    0x5c, 0xa8, 0xaf, 0xce, 0xaf, 0x0b, 0xf1, 0x2b,
			    0x88, 0x1d, 0xc2, 0x00, 0xc9, 0x83, 0x3d, 0xa7,
			    0x26, 0xe9, 0x37, 0x6c, 0x2e, 0x32, 0xcf, 0xf7 }
	},
	{
		.auth_key_length = HMAC_SHA256_KEY_LEN,
		/* "Jefe" */
		.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
		.length = 28,
		/* what do ya want for nothing?*/
		.plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
			       0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
			       0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
			       0x69, 0x6e, 0x67, 0x3f },
		.ciphertext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
				0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
				0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
				0x69, 0x6e, 0x67, 0x3f },
		.digest_length = HMAC_SHA256_CHECK_LEN,
		.digest = { 0x5b, 0xdc, 0xc1, 0x46, 0xbf, 0x60, 0x75, 0x4e,
			    0x6a, 0x04, 0x24, 0x26, 0x08, 0x95, 0x75, 0xc7,
			    0x5a, 0x00, 0x3f, 0x08, 0x9d, 0x27, 0x39, 0x83,
			    0x9d, 0xec, 0x58, 0xb9, 0x64, 0xec, 0x38, 0x43 }
	},
	{
		.auth_key_length = HMAC_SHA256_KEY_LEN,
		.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa },
		.length = 50,
		.plaintext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd },
		.ciphertext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd },
		.digest_length = HMAC_SHA256_CHECK_LEN,
		.digest = { 0x77, 0x3e, 0xa9, 0x1e, 0x36, 0x80, 0x0e, 0x46,
			    0x85, 0x4d, 0xb8, 0xeb, 0xd0, 0x91, 0x81, 0xa7,
			    0x29, 0x59, 0x09, 0x8b, 0x3e, 0xf8, 0xc1, 0x22,
			    0xd9, 0x63, 0x55, 0x14, 0xce, 0xd5, 0x65, 0xfe }
	}
};

static crypto_test_reference_t hmac_sha384_reference[] = {
	{
		.auth_key_length = HMAC_SHA384_KEY_LEN,
		.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b },
		.length = 8,
		/* "Hi There" */
		.plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.ciphertext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.digest_length = HMAC_SHA384_192_CHECK_LEN,
		.digest = { 0xaf, 0xd0, 0x39, 0x44, 0xd8, 0x48, 0x95, 0x62,
			    0x6b, 0x08, 0x25, 0xf4, 0xab, 0x46, 0x90, 0x7f,
			    0x15, 0xf9, 0xda, 0xdb, 0xe4, 0x10, 0x1e, 0xc6 }
	},
	{
		.auth_key_length = HMAC_SHA384_KEY_LEN,
		/* "Jefe" */
		.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
		.length = 28,
		/* what do ya want for nothing?*/
		.plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
			       0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
			       0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
			       0x69, 0x6e, 0x67, 0x3f },
		.ciphertext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
				0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
				0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
				0x69, 0x6e, 0x67, 0x3f },
		.digest_length = HMAC_SHA384_192_CHECK_LEN,
		.digest = { 0xaf, 0x45, 0xd2, 0xe3, 0x76, 0x48, 0x40, 0x31,
			    0x61, 0x7f, 0x78, 0xd2, 0xb5, 0x8a, 0x6b, 0x1b,
			    0x9c, 0x7e, 0xf4, 0x64, 0xf5, 0xa0, 0x1b, 0x47 }
	},
	{
		.auth_key_length = HMAC_SHA384_KEY_LEN,
		.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa },
		.length = 50,
		.plaintext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd },
		.ciphertext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd },
		.digest_length = HMAC_SHA384_192_CHECK_LEN,
		.digest = { 0x88, 0x06, 0x26, 0x08, 0xd3, 0xe6, 0xad, 0x8a,
			    0x0a, 0xa2, 0xac, 0xe0, 0x14, 0xc8, 0xa8, 0x6f,
			    0x0a, 0xa6, 0x35, 0xd9, 0x47, 0xac, 0x9f, 0xeb }
	},
	{
		.auth_key_length = HMAC_SHA384_KEY_LEN,
		.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b },
		.length = 8,
		/* "Hi There" */
		.plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.ciphertext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.digest_length = HMAC_SHA384_CHECK_LEN,
		.digest = { 0xaf, 0xd0, 0x39, 0x44, 0xd8, 0x48, 0x95, 0x62,
			    0x6b, 0x08, 0x25, 0xf4, 0xab, 0x46, 0x90, 0x7f,
			    0x15, 0xf9, 0xda, 0xdb, 0xe4, 0x10, 0x1e, 0xc6,
			    0x82, 0xaa, 0x03, 0x4c, 0x7c, 0xeb, 0xc5, 0x9c,
			    0xfa, 0xea, 0x9e, 0xa9, 0x07, 0x6e, 0xde, 0x7f,
			    0x4a, 0xf1, 0x52, 0xe8, 0xb2, 0xfa, 0x9c, 0xb6 }
	},
	{
		.auth_key_length = HMAC_SHA384_KEY_LEN,
		/* "Jefe" */
		.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
		.length = 28,
		/* what do ya want for nothing?*/
		.plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
			       0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
			       0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
			       0x69, 0x6e, 0x67, 0x3f },
		.ciphertext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
				0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
				0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
				0x69, 0x6e, 0x67, 0x3f },
		.digest_length = HMAC_SHA384_CHECK_LEN,
		.digest = { 0xaf, 0x45, 0xd2, 0xe3, 0x76, 0x48, 0x40, 0x31,
			    0x61, 0x7f, 0x78, 0xd2, 0xb5, 0x8a, 0x6b, 0x1b,
			    0x9c, 0x7e, 0xf4, 0x64, 0xf5, 0xa0, 0x1b, 0x47,
			    0xe4, 0x2e, 0xc3, 0x73, 0x63, 0x22, 0x44, 0x5e,
			    0x8e, 0x22, 0x40, 0xca, 0x5e, 0x69, 0xe2, 0xc7,
			    0x8b, 0x32, 0x39, 0xec, 0xfa, 0xb2, 0x16, 0x49 }
	},
	{
		.auth_key_length = HMAC_SHA384_KEY_LEN,
		.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa },
		.length = 50,
		.plaintext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd },
		.ciphertext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd },
		.digest_length = HMAC_SHA384_CHECK_LEN,
		.digest = {0x88, 0x06, 0x26, 0x08, 0xd3, 0xe6, 0xad, 0x8a,
			    0x0a, 0xa2, 0xac, 0xe0, 0x14, 0xc8, 0xa8, 0x6f,
			    0x0a, 0xa6, 0x35, 0xd9, 0x47, 0xac, 0x9f, 0xeb,
			    0xe8, 0x3e, 0xf4, 0xe5, 0x59, 0x66, 0x14, 0x4b,
			    0x2a, 0x5a, 0xb3, 0x9d, 0xc1, 0x38, 0x14, 0xb9,
			    0x4e, 0x3a, 0xb6, 0xe1, 0x01, 0xa3, 0x4f, 0x27 }
	}
};

static crypto_test_reference_t hmac_sha512_reference[] = {
	{
		.auth_key_length = HMAC_SHA512_KEY_LEN,
		.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b },
		.length = 8,
		/* "Hi There" */
		.plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.ciphertext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.digest_length = HMAC_SHA512_256_CHECK_LEN,
		.digest = { 0x87, 0xaa, 0x7c, 0xde, 0xa5, 0xef, 0x61, 0x9d,
			    0x4f, 0xf0, 0xb4, 0x24, 0x1a, 0x1d, 0x6c, 0xb0,
			    0x23, 0x79, 0xf4, 0xe2, 0xce, 0x4e, 0xc2, 0x78,
			    0x7a, 0xd0, 0xb3, 0x05, 0x45, 0xe1, 0x7c, 0xde }
	},
	{
		.auth_key_length = HMAC_SHA512_KEY_LEN,
		/* "Jefe" */
		.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
		.length = 28,
		/* what do ya want for nothing?*/
		.plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
			       0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
			       0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
			       0x69, 0x6e, 0x67, 0x3f },
		.ciphertext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
				0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
				0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
				0x69, 0x6e, 0x67, 0x3f },
		.digest_length = HMAC_SHA512_256_CHECK_LEN,
		.digest = { 0x16, 0x4b, 0x7a, 0x7b, 0xfc, 0xf8, 0x19, 0xe2,
			    0xe3, 0x95, 0xfb, 0xe7, 0x3b, 0x56, 0xe0, 0xa3,
			    0x87, 0xbd, 0x64, 0x22, 0x2e, 0x83, 0x1f, 0xd6,
			    0x10, 0x27, 0x0c, 0xd7, 0xea, 0x25, 0x05, 0x54 }
	},
	{
		.auth_key_length = HMAC_SHA512_KEY_LEN,
		.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa },
		.length = 50,
		.plaintext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd },
		.ciphertext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd },
		.digest_length = HMAC_SHA512_256_CHECK_LEN,
		.digest = { 0xfa, 0x73, 0xb0, 0x08, 0x9d, 0x56, 0xa2, 0x84,
			    0xef, 0xb0, 0xf0, 0x75, 0x6c, 0x89, 0x0b, 0xe9,
			    0xb1, 0xb5, 0xdb, 0xdd, 0x8e, 0xe8, 0x1a, 0x36,
			    0x55, 0xf8, 0x3e, 0x33, 0xb2, 0x27, 0x9d, 0x39 }
	},
	{
		.auth_key_length = HMAC_SHA512_KEY_LEN,
		.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			      0x0b, 0x0b, 0x0b, 0x0b },
		.length = 8,
		/* "Hi There" */
		.plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.ciphertext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
		.digest_length = HMAC_SHA512_CHECK_LEN,
		.digest = { 0x87, 0xaa, 0x7c, 0xde, 0xa5, 0xef, 0x61, 0x9d,
			    0x4f, 0xf0, 0xb4, 0x24, 0x1a, 0x1d, 0x6c, 0xb0,
			    0x23, 0x79, 0xf4, 0xe2, 0xce, 0x4e, 0xc2, 0x78,
			    0x7a, 0xd0, 0xb3, 0x05, 0x45, 0xe1, 0x7c, 0xde,
			    0xda, 0xa8, 0x33, 0xb7, 0xd6, 0xb8, 0xa7, 0x02,
			    0x03, 0x8b, 0x27, 0x4e, 0xae, 0xa3, 0xf4, 0xe4,
			    0xbe, 0x9d, 0x91, 0x4e, 0xeb, 0x61, 0xf1, 0x70,
			    0x2e, 0x69, 0x6c, 0x20, 0x3a, 0x12, 0x68, 0x54 }
	},
	{
		.auth_key_length = HMAC_SHA512_KEY_LEN,
		/* "Jefe" */
		.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
		.length = 28,
		/* what do ya want for nothing?*/
		.plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
			       0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
			       0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
			       0x69, 0x6e, 0x67, 0x3f },
		.ciphertext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
				0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
				0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
				0x69, 0x6e, 0x67, 0x3f },
		.digest_length = HMAC_SHA512_CHECK_LEN,
		.digest = { 0x16, 0x4b, 0x7a, 0x7b, 0xfc, 0xf8, 0x19, 0xe2,
			    0xe3, 0x95, 0xfb, 0xe7, 0x3b, 0x56, 0xe0, 0xa3,
			    0x87, 0xbd, 0x64, 0x22, 0x2e, 0x83, 0x1f, 0xd6,
			    0x10, 0x27, 0x0c, 0xd7, 0xea, 0x25, 0x05, 0x54,
			    0x97, 0x58, 0xbf, 0x75, 0xc0, 0x5a, 0x99, 0x4a,
			    0x6d, 0x03, 0x4f, 0x65, 0xf8, 0xf0, 0xe6, 0xfd,
			    0xca, 0xea, 0xb1, 0xa3, 0x4d, 0x4a, 0x6b, 0x4b,
			    0x63, 0x6e, 0x07, 0x0a, 0x38, 0xbc, 0xe7, 0x37 }
	},
	{
		.auth_key_length = HMAC_SHA512_KEY_LEN,
		.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			      0xaa, 0xaa, 0xaa, 0xaa },
		.length = 50,
		.plaintext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
			       0xdd, 0xdd },
		.ciphertext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
				0xdd, 0xdd },
		.digest_length = HMAC_SHA512_CHECK_LEN,
		.digest = { 0xfa, 0x73, 0xb0, 0x08, 0x9d, 0x56, 0xa2, 0x84,
			    0xef, 0xb0, 0xf0, 0x75, 0x6c, 0x89, 0x0b, 0xe9,
			    0xb1, 0xb5, 0xdb, 0xdd, 0x8e, 0xe8, 0x1a, 0x36,
			    0x55, 0xf8, 0x3e, 0x33, 0xb2, 0x27, 0x9d, 0x39,
			    0xbf, 0x3e, 0x84, 0x82, 0x79, 0xa7, 0x22, 0xc8,
			    0x06, 0xb4, 0x85, 0xa4, 0x7e, 0x67, 0xc8, 0x07,
			    0xb9, 0x46, 0xa3, 0x37, 0xbe, 0xe8, 0x94, 0x26,
			    0x74, 0x27, 0x88, 0x59, 0xe1, 0x32, 0x92, 0xfb }
	}
};

static crypto_test_reference_t aes_xcbc_reference[] = {
	{
		.auth_key_length = AES_XCBC_MAC_KEY_LEN,
		.auth_key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			      0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
		.length = 3,
		.plaintext = { 0x00, 0x01, 0x02 },
		.ciphertext = { 0x00, 0x01, 0x02 },
		.digest_length = AES_XCBC_MAC_96_CHECK_LEN,
		.digest = { 0x5b, 0x37, 0x65, 0x80, 0xae, 0x2f, 0x19, 0xaf,
			    0xe7, 0x21, 0x9c, 0xee }
	},
	{
		.auth_key_length = AES_XCBC_MAC_KEY_LEN,
		.auth_key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			      0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
		.length = 16,
		.plaintext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			      0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
		.ciphertext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			      0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
		.digest_length = AES_XCBC_MAC_96_CHECK_LEN,
		.digest = { 0xd2, 0xa2, 0x46, 0xfa, 0x34, 0x9b, 0x68, 0xa7,
			    0x99, 0x98, 0xa4, 0x39 }
	},
	{
		.auth_key_length = AES_XCBC_MAC_KEY_LEN,
		.auth_key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			      0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
		.length = 20,
		.plaintext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			      0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
			      0x10, 0x11, 0x12, 0x13 },
		.ciphertext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			      0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
			      0x10, 0x11, 0x12, 0x13 },
		.digest_length = AES_XCBC_MAC_96_CHECK_LEN,
		.digest = {  0x47, 0xf5, 0x1b, 0x45, 0x64, 0x96, 0x62, 0x15,
			0xb8, 0x98, 0x5c, 0x63 }
	},
	{
		.auth_key_length = AES_XCBC_MAC_KEY_LEN,
		.auth_key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			      0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
		.length = 3,
		.plaintext = { 0x00, 0x01, 0x02 },
		.ciphertext = { 0x00, 0x01, 0x02 },
		.digest_length = AES_XCBC_MAC_CHECK_LEN,
		.digest = { 0x5b, 0x37, 0x65, 0x80, 0xae, 0x2f, 0x19, 0xaf,
			    0xe7, 0x21, 0x9c, 0xee, 0xf1, 0x72, 0x75, 0x6f }
	},
	{
		.auth_key_length = AES_XCBC_MAC_KEY_LEN,
		.auth_key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			      0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
		.length = 16,
		.plaintext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			      0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
		.ciphertext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			      0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
		.digest_length = AES_XCBC_MAC_CHECK_LEN,
		.digest = { 0xd2, 0xa2, 0x46, 0xfa, 0x34, 0x9b, 0x68, 0xa7,
			    0x99, 0x98, 0xa4, 0x39, 0x4f, 0xf7, 0xa2, 0x63 }
	},
	{
		.auth_key_length = AES_XCBC_MAC_KEY_LEN,
		.auth_key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			      0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
		.length = 20,
		.plaintext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			      0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
			      0x10, 0x11, 0x12, 0x13 },
		.ciphertext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			      0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
			      0x10, 0x11, 0x12, 0x13 },
		.digest_length = AES_XCBC_MAC_CHECK_LEN,
		.digest = {  0x47, 0xf5, 0x1b, 0x45, 0x64, 0x96, 0x62, 0x15,
			0xb8, 0x98, 0x5c, 0x63, 0x05, 0x5e, 0xd3, 0x08 }
	}
};

/*
 * Kasumi F8 and F9 test vectors are taken from
 * 3GPP TS 35.203 V9.0.0 (2009-12)
 * 3rd Generation Partnership Project;
 * Technical Specification Group Services and System Aspects;
 * 3G Security;
 * Specification of the 3GPP Confidentiality
 * and Integrity Algorithms;
 * Document 3: Implementors' Test Data
 * (Release 9)
 */
static crypto_test_reference_t kasumi_f8_reference[] = {
	{
		.cipher_key_length = KASUMI_F8_KEY_LEN,
		.cipher_key = { 0x5a, 0xcb, 0x1d, 0x64, 0x4c, 0x0d, 0x51, 0x20,
				0x4e, 0xa5, 0xf1, 0x45, 0x10, 0x10, 0xd8, 0x52},
		.cipher_iv_length = KASUMI_F8_IV_LEN,
		.cipher_iv = { 0xfa, 0x55, 0x6b, 0x26, 0x1c, 0x00, 0x00, 0x00},
		.length = 120, /* 15 bytes */
		.plaintext = {  0xad, 0x9c, 0x44, 0x1f, 0x89, 0x0b, 0x38, 0xc4,
				0x57, 0xa4, 0x9d, 0x42, 0x14, 0x07, 0xe8 },
		.ciphertext = { 0x9b, 0xc9, 0x2c, 0xa8, 0x03, 0xc6, 0x7b, 0x28,
				0xa1, 0x1a, 0x4b, 0xee, 0x5a, 0x0c, 0x25 }
	}
};

static crypto_test_reference_t kasumi_f9_reference[] = {
	{
		.auth_key_length = KASUMI_F9_KEY_LEN,
		.auth_key = { 0xc7, 0x36, 0xc6, 0xaa, 0xb2, 0x2b, 0xff, 0xf9,
			      0x1e, 0x26, 0x98, 0xd2, 0xe2, 0x2a, 0xd5, 0x7e },
		.auth_iv_length = KASUMI_F9_IV_LEN,
		.auth_iv = { 0x14, 0x79, 0x3e, 0x41, 0x03, 0x97, 0xe8, 0xfd,
			     0x01, },
		.length = 384, /* 48 bytes */
		.plaintext = {  0xd0, 0xa7, 0xd4, 0x63, 0xdf, 0x9f, 0xb2, 0xb2,
				0x78, 0x83, 0x3f, 0xa0, 0x2e, 0x23, 0x5a, 0xa1,
				0x72, 0xbd, 0x97, 0x0c, 0x14, 0x73, 0xe1, 0x29,
				0x07, 0xfb, 0x64, 0x8b, 0x65, 0x99, 0xaa, 0xa0,
				0xb2, 0x4a, 0x03, 0x86, 0x65, 0x42, 0x2b, 0x20,
				0xa4, 0x99, 0x27, 0x6a, 0x50, 0x42, 0x70, 0x09},
		.ciphertext = { 0xd0, 0xa7, 0xd4, 0x63, 0xdf, 0x9f, 0xb2, 0xb2,
				0x78, 0x83, 0x3f, 0xa0, 0x2e, 0x23, 0x5a, 0xa1,
				0x72, 0xbd, 0x97, 0x0c, 0x14, 0x73, 0xe1, 0x29,
				0x07, 0xfb, 0x64, 0x8b, 0x65, 0x99, 0xaa, 0xa0,
				0xb2, 0x4a, 0x03, 0x86, 0x65, 0x42, 0x2b, 0x20,
				0xa4, 0x99, 0x27, 0x6a, 0x50, 0x42, 0x70, 0x09},
		.digest_length = KASUMI_F9_DIGEST_LEN,
		.digest = { 0xdd, 0x7d, 0xfa, 0xdd },
	}
};

/*
 * Snow3G UEA2 & UIA2 test vectors are taken from
 * Specification of the 3GPP Confidentiality and
 * Integrity Algorithms UEA2 & UIA2
 * Document 3: Implementors’ Test Data
 * Version: 1.1
 * Date: 25 th October 2012
 */
static crypto_test_reference_t snow3g_uea2_reference[] = {
	{
		.cipher_key_length = SNOW3G_UEA2_KEY_LEN,
		.cipher_key = { 0x5a, 0xcb, 0x1d, 0x64, 0x4c, 0x0d, 0x51, 0x20,
				0x4e, 0xa5, 0xf1, 0x45, 0x10, 0x10, 0xd8, 0x52},
		.cipher_iv_length = SNOW3G_UEA2_IV_LEN,
		.cipher_iv = { 0xfa, 0x55, 0x6b, 0x26, 0x1c, 0x00, 0x00, 0x00,
			       0xfa, 0x55, 0x6b, 0x26, 0x1c, 0x00, 0x00, 0x00},
		.length = 120, /* 15 bytes */
		.plaintext = {  0xad, 0x9c, 0x44, 0x1f, 0x89, 0x0b, 0x38, 0xc4,
				0x57, 0xa4, 0x9d, 0x42, 0x14, 0x07, 0xe8 },
		.ciphertext = { 0xba, 0x0f, 0x31, 0x30, 0x03, 0x34, 0xc5, 0x6b,
				0x52, 0xa7, 0x49, 0x7c, 0xba, 0xc0, 0x46 }
	}
};

static crypto_test_reference_t snow3g_uia2_reference[] = {
	{
		.auth_key_length = SNOW3G_UIA2_KEY_LEN,
		.auth_key = { 0xc7, 0x36, 0xc6, 0xaa, 0xb2, 0x2b, 0xff, 0xf9,
			      0x1e, 0x26, 0x98, 0xd2, 0xe2, 0x2a, 0xd5, 0x7e},
		.auth_iv_length = SNOW3G_UIA2_IV_LEN,
		.auth_iv = { 0x14, 0x79, 0x3e, 0x41, 0x03, 0x97, 0xe8, 0xfd,
			     0x94, 0x79, 0x3e, 0x41, 0x03, 0x97, 0x68, 0xfd },
		.length = 384, /* 48 bytes */
		.plaintext = {  0xd0, 0xa7, 0xd4, 0x63, 0xdf, 0x9f, 0xb2, 0xb2,
				0x78, 0x83, 0x3f, 0xa0, 0x2e, 0x23, 0x5a, 0xa1,
				0x72, 0xbd, 0x97, 0x0c, 0x14, 0x73, 0xe1, 0x29,
				0x07, 0xfb, 0x64, 0x8b, 0x65, 0x99, 0xaa, 0xa0,
				0xb2, 0x4a, 0x03, 0x86, 0x65, 0x42, 0x2b, 0x20,
				0xa4, 0x99, 0x27, 0x6a, 0x50, 0x42, 0x70, 0x09},
		.ciphertext = { 0xd0, 0xa7, 0xd4, 0x63, 0xdf, 0x9f, 0xb2, 0xb2,
				0x78, 0x83, 0x3f, 0xa0, 0x2e, 0x23, 0x5a, 0xa1,
				0x72, 0xbd, 0x97, 0x0c, 0x14, 0x73, 0xe1, 0x29,
				0x07, 0xfb, 0x64, 0x8b, 0x65, 0x99, 0xaa, 0xa0,
				0xb2, 0x4a, 0x03, 0x86, 0x65, 0x42, 0x2b, 0x20,
				0xa4, 0x99, 0x27, 0x6a, 0x50, 0x42, 0x70, 0x09},
		.digest_length = SNOW3G_UIA2_DIGEST_LEN,
		.digest = { 0x38, 0xb5, 0x54, 0xc0 }
	}
};

/*
 * AES EEA2 and AES EIA2 test vectors from
 * Specification of the 3GPP Confidentiality and Integrity
 * Algorithms 128-EEA2 & 128-EIA2
 */
static crypto_test_reference_t aes_eea2_reference[] = {
	{
		.cipher_key_length = AES_EEA2_KEY_LEN,
		.cipher_key = { 0xD3, 0xC5, 0xD5, 0x92, 0x32, 0x7F, 0xB1, 0x1C,
				0x40, 0x35, 0xC6, 0x68, 0x0A, 0xF8, 0xC6, 0xD1},
		.cipher_iv_length = AES_EEA2_IV_LEN,
		.cipher_iv = { 0x39, 0x8a, 0x59, 0xb4, 0xac, },
		.length = 248 /* + 5 */, /* 253 bits originally = 31 + 1 bytes*/
		.plaintext = { 0x98, 0x1B, 0xA6, 0x82, 0x4C, 0x1B, 0xFB, 0x1A,
			       0xB4, 0x85, 0x47, 0x20, 0x29, 0xB7, 0x1D, 0x80,
			       0x8C, 0xE3, 0x3E, 0x2C, 0xC3, 0xC0, 0xB5, 0xFC,
			       0x1F, 0x3D, 0xE8, 0xA6, 0xDC, 0x66, 0xB1, 0xF0 },
		.ciphertext = { 0xE9, 0xFE, 0xD8, 0xA6, 0x3D, 0x15, 0x53, 0x04,
				0xD7, 0x1D, 0xF2, 0x0B, 0xF3, 0xE8, 0x22, 0x14,
				0xB2, 0x0E, 0xD7, 0xDA, 0xD2, 0xF2, 0x33, 0xDC,
				0x3C, 0x22, 0xD7, 0xBD, 0xEE, 0xED, 0x8E, 0x78}
	},
	{
		.cipher_key_length = AES_EEA2_KEY_LEN,
		.cipher_key = { 0x2B, 0xD6, 0x45, 0x9F, 0x82, 0xC4, 0x40, 0xE0,
				0x95, 0x2C, 0x49, 0x10, 0x48, 0x05, 0xFF, 0x48},
		.cipher_iv_length = AES_EEA2_IV_LEN,
		.cipher_iv = { 0xc6, 0x75, 0xa6, 0x4b, 0x64, },
		.length = 99 /* + 6 */, /* 798 bits originally = 99 + 1 bytes */
		.plaintext = { 0x7E, 0xC6, 0x12, 0x72, 0x74, 0x3B, 0xF1, 0x61,
			       0x47, 0x26, 0x44, 0x6A, 0x6C, 0x38, 0xCE, 0xD1,
			       0x66, 0xF6, 0xCA, 0x76, 0xEB, 0x54, 0x30, 0x04,
			       0x42, 0x86, 0x34, 0x6C, 0xEF, 0x13, 0x0F, 0x92,
			       0x92, 0x2B, 0x03, 0x45, 0x0D, 0x3A, 0x99, 0x75,
			       0xE5, 0xBD, 0x2E, 0xA0, 0xEB, 0x55, 0xAD, 0x8E,
			       0x1B, 0x19, 0x9E, 0x3E, 0xC4, 0x31, 0x60, 0x20,
			       0xE9, 0xA1, 0xB2, 0x85, 0xE7, 0x62, 0x79, 0x53,
			       0x59, 0xB7, 0xBD, 0xFD, 0x39, 0xBE, 0xF4, 0xB2,
			       0x48, 0x45, 0x83, 0xD5, 0xAF, 0xE0, 0x82, 0xAE,
			       0xE6, 0x38, 0xBF, 0x5F, 0xD5, 0xA6, 0x06, 0x19,
			       0x39, 0x01, 0xA0, 0x8F, 0x4A, 0xB4, 0x1A, 0xAB,
			       0x9B, 0x13, 0x48, 0x80 },
		.ciphertext = { 0x59, 0x61, 0x60, 0x53, 0x53, 0xC6, 0x4B, 0xDC,
				0xA1, 0x5B, 0x19, 0x5E, 0x28, 0x85, 0x53, 0xA9,
				0x10, 0x63, 0x25, 0x06, 0xD6, 0x20, 0x0A, 0xA7,
				0x90, 0xC4, 0xC8, 0x06, 0xC9, 0x99, 0x04, 0xCF,
				0x24, 0x45, 0xCC, 0x50, 0xBB, 0x1C, 0xF1, 0x68,
				0xA4, 0x96, 0x73, 0x73, 0x4E, 0x08, 0x1B, 0x57,
				0xE3, 0x24, 0xCE, 0x52, 0x59, 0xC0, 0xE7, 0x8D,
				0x4C, 0xD9, 0x7B, 0x87, 0x09, 0x76, 0x50, 0x3C,
				0x09, 0x43, 0xF2, 0xCB, 0x5A, 0xE8, 0xF0, 0x52,
				0xC7, 0xB7, 0xD3, 0x92, 0x23, 0x95, 0x87, 0xB8,
				0x95, 0x60, 0x86, 0xBC, 0xAB, 0x18, 0x83, 0x60,
				0x42, 0xE2, 0xE6, 0xCE, 0x42, 0x43, 0x2A, 0x17,
				0x10, 0x5C, 0x53, 0xD0 }
	},
};

static crypto_test_reference_t aes_eia2_reference[] = {
	{
		.auth_key_length = AES_EIA2_KEY_LEN,
		.auth_key = { 0xD3, 0xC5, 0xD5, 0x92, 0x32, 0x7F, 0xB1, 0x1C,
			      0x40, 0x35, 0xC6, 0x68, 0x0A, 0xF8, 0xC6, 0xD1 },
		.auth_iv_length = AES_EIA2_IV_LEN,
		.auth_iv = { 0x39, 0x8a, 0x59, 0xb4, 0xd4, },
		.length = 64, /* 8 bytes */
		.plaintext = { 0x48, 0x45, 0x83, 0xd5, 0xaf, 0xe0, 0x82, 0xae },
		.ciphertext = { 0x48, 0x45, 0x83, 0xd5, 0xaf, 0xe0, 0x82, 0xae},
		.digest_length = AES_EIA2_DIGEST_LEN,
		.digest = { 0xb9, 0x37, 0x87, 0xe6 }
	},
};

/*
 * ZUC EEA3 and EIA3 test vectors from
 * Specification of the 3GPP Confidentiality and Integrity
 * Algorithms 128-EEA3 & 128-EIA3
 * Document 3: Implementor’s Test Data
 * Version: 1.1
 * Date: 4 th Jan. 2011
 */
static crypto_test_reference_t zuc_eea3_reference[] = {
	{
		.cipher_key_length = ZUC_EIA3_KEY_LEN,
		.cipher_key = { 0xe5, 0xbd, 0x3e, 0xa0, 0xeb, 0x55, 0xad, 0xe8,
				0x66, 0xc6, 0xac, 0x58, 0xbd, 0x54, 0x30, 0x2a},
		.cipher_iv_length = ZUC_EEA3_IV_LEN,
		.cipher_iv = { 0x00, 0x05, 0x68, 0x23, 0xc4, 0x00, 0x00, 0x00,
			0x00, 0x05, 0x68, 0x23, 0xc4, 0x00, 0x00, 0x00 },
		.length = 800, /* 100 bytes */
		.plaintext = {  0x14, 0xa8, 0xef, 0x69, 0x3d, 0x67, 0x85, 0x07,
				0xbb, 0xe7, 0x27, 0x0a, 0x7f, 0x67, 0xff, 0x50,
				0x06, 0xc3, 0x52, 0x5b, 0x98, 0x07, 0xe4, 0x67,
				0xc4, 0xe5, 0x60, 0x00, 0xba, 0x33, 0x8f, 0x5d,
				0x42, 0x95, 0x59, 0x03, 0x67, 0x51, 0x82, 0x22,
				0x46, 0xc8, 0x0d, 0x3b, 0x38, 0xf0, 0x7f, 0x4b,
				0xe2, 0xd8, 0xff, 0x58, 0x05, 0xf5, 0x13, 0x22,
				0x29, 0xbd, 0xe9, 0x3b, 0xbb, 0xdc, 0xaf, 0x38,
				0x2b, 0xf1, 0xee, 0x97, 0x2f, 0xbf, 0x99, 0x77,
				0xba, 0xda, 0x89, 0x45, 0x84, 0x7a, 0x2a, 0x6c,
				0x9a, 0xd3, 0x4a, 0x66, 0x75, 0x54, 0xe0, 0x4d,
				0x1f, 0x7f, 0xa2, 0xc3, 0x32, 0x41, 0xbd, 0x8f,
				0x01, 0xba, 0x22, 0x0d },
		.ciphertext = { 0x13, 0x1d, 0x43, 0xe0, 0xde, 0xa1, 0xbe, 0x5c,
				0x5a, 0x1b, 0xfd, 0x97, 0x1d, 0x85, 0x2c, 0xbf,
				0x71, 0x2d, 0x7b, 0x4f, 0x57, 0x96, 0x1f, 0xea,
				0x32, 0x08, 0xaf, 0xa8, 0xbc, 0xa4, 0x33, 0xf4,
				0x56, 0xad, 0x09, 0xc7, 0x41, 0x7e, 0x58, 0xbc,
				0x69, 0xcf, 0x88, 0x66, 0xd1, 0x35, 0x3f, 0x74,
				0x86, 0x5e, 0x80, 0x78, 0x1d, 0x20, 0x2d, 0xfb,
				0x3e, 0xcf, 0xf7, 0xfc, 0xbc, 0x3b, 0x19, 0x0f,
				0xe8, 0x2a, 0x20, 0x4e, 0xd0, 0xe3, 0x50, 0xfc,
				0x0f, 0x6f, 0x26, 0x13, 0xb2, 0xf2, 0xbc, 0xa6,
				0xdf, 0x5a, 0x47, 0x3a, 0x57, 0xa4, 0xa0, 0x0d,
				0x98, 0x5e, 0xba, 0xd8, 0x80, 0xd6, 0xf2, 0x38,
				0x64, 0xa0, 0x7b, 0x01 }
	}
};

static crypto_test_reference_t zuc_eia3_reference[] = {
	{
		.auth_key_length = ZUC_EIA3_KEY_LEN,
		.auth_key = { 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb,
			      0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a },
		.auth_iv_length = ZUC_EIA3_IV_LEN,
		.auth_iv = { 0xa9, 0x40, 0x59, 0xda, 0x50, 0x00, 0x00, 0x00,
			     0x29, 0x40, 0x59, 0xda, 0x50, 0x00, 0x80, 0x00 },
		.length = 584, /* 73 bytes */
		.plaintext = {  0x98, 0x3b, 0x41, 0xd4, 0x7d, 0x78, 0x0c, 0x9e,
				0x1a, 0xd1, 0x1d, 0x7e, 0xb7, 0x03, 0x91, 0xb1,
				0xde, 0x0b, 0x35, 0xda, 0x2d, 0xc6, 0x2f, 0x83,
				0xe7, 0xb7, 0x8d, 0x63, 0x06, 0xca, 0x0e, 0xa0,
				0x7e, 0x94, 0x1b, 0x7b, 0xe9, 0x13, 0x48, 0xf9,
				0xfc, 0xb1, 0x70, 0xe2, 0x21, 0x7f, 0xec, 0xd9,
				0x7f, 0x9f, 0x68, 0xad, 0xb1, 0x6e, 0x5d, 0x7d,
				0x21, 0xe5, 0x69, 0xd2, 0x80, 0xed, 0x77, 0x5c,
				0xeb, 0xde, 0x3f, 0x40, 0x93, 0xc5, 0x38, 0x81,
				0x00, 0x00, 0x00, 0x00 },
		.ciphertext = { 0x98, 0x3b, 0x41, 0xd4, 0x7d, 0x78, 0x0c, 0x9e,
				0x1a, 0xd1, 0x1d, 0x7e, 0xb7, 0x03, 0x91, 0xb1,
				0xde, 0x0b, 0x35, 0xda, 0x2d, 0xc6, 0x2f, 0x83,
				0xe7, 0xb7, 0x8d, 0x63, 0x06, 0xca, 0x0e, 0xa0,
				0x7e, 0x94, 0x1b, 0x7b, 0xe9, 0x13, 0x48, 0xf9,
				0xfc, 0xb1, 0x70, 0xe2, 0x21, 0x7f, 0xec, 0xd9,
				0x7f, 0x9f, 0x68, 0xad, 0xb1, 0x6e, 0x5d, 0x7d,
				0x21, 0xe5, 0x69, 0xd2, 0x80, 0xed, 0x77, 0x5c,
				0xeb, 0xde, 0x3f, 0x40, 0x93, 0xc5, 0x38, 0x81,
				0x00, 0x00, 0x00, 0x00 },
		.digest_length = ZUC_EIA3_DIGEST_LEN,
		.digest = { 0x24, 0xa8, 0x42, 0xb3 }
	}
};

/*
 * MD5 test vectors from RFC 1321
 */
static crypto_test_reference_t md5_reference[] = {
	{
		.length = 3,
		.plaintext = { 0x61, 0x62, 0x63 },
		.ciphertext = { 0x61, 0x62, 0x63 },
		.digest_length = MD5_DIGEST_LEN,
		.digest = { 0x90, 0x01, 0x50, 0x98, 0x3c, 0xd2, 0x4f, 0xb0,
			    0xd6, 0x96, 0x3f, 0x7d, 0x28, 0xe1, 0x7f, 0x72}
	},
	{
		.length = 62,
		.plaintext = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
			       0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50,
			       0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
			       0x59, 0x5a, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66,
			       0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e,
			       0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76,
			       0x77, 0x78, 0x79, 0x7a, 0x30, 0x31, 0x32, 0x33,
			       0x34, 0x35, 0x36, 0x37, 0x38, 0x39 },
		.ciphertext = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
				0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50,
				0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
				0x59, 0x5a, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66,
				0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e,
				0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76,
				0x77, 0x78, 0x79, 0x7a, 0x30, 0x31, 0x32, 0x33,
				0x34, 0x35, 0x36, 0x37, 0x38, 0x39 },
		.digest_length = MD5_DIGEST_LEN,
		.digest = { 0xd1, 0x74, 0xab, 0x98, 0xd2, 0x77, 0xd9, 0xf5,
			    0xa5, 0x61, 0x1c, 0x2c, 0x9f, 0x41, 0x9d, 0x9f},
	}
};

/*
 * SHA test vectors from Crypto++
 */
static crypto_test_reference_t sha1_reference[] = {
	{
		.length = 3,
		.plaintext = { 0x61, 0x62, 0x63 },
		.ciphertext = { 0x61, 0x62, 0x63 },
		.digest_length = SHA1_DIGEST_LEN,
		.digest = { 0xA9, 0x99, 0x3E, 0x36, 0x47, 0x06, 0x81, 0x6A,
			    0xBA, 0x3E, 0x25, 0x71, 0x78, 0x50, 0xC2, 0x6C,
			    0x9C, 0xD0, 0xD8, 0x9D},
	},
	{
		.length = 56,
		.plaintext = { 0x61, 0x62, 0x63, 0x64, 0x62, 0x63, 0x64, 0x65,
			       0x63, 0x64, 0x65, 0x66, 0x64, 0x65, 0x66, 0x67,
			       0x65, 0x66, 0x67, 0x68, 0x66, 0x67, 0x68, 0x69,
			       0x67, 0x68, 0x69, 0x6a, 0x68, 0x69, 0x6a, 0x6b,
			       0x69, 0x6a, 0x6b, 0x6c, 0x6a, 0x6b, 0x6c, 0x6d,
			       0x6b, 0x6c, 0x6d, 0x6e, 0x6c, 0x6d, 0x6e, 0x6f,
			       0x6d, 0x6e, 0x6f, 0x70, 0x6e, 0x6f, 0x70, 0x71},
		.ciphertext = { 0x61, 0x62, 0x63, 0x64, 0x62, 0x63, 0x64, 0x65,
				0x63, 0x64, 0x65, 0x66, 0x64, 0x65, 0x66, 0x67,
				0x65, 0x66, 0x67, 0x68, 0x66, 0x67, 0x68, 0x69,
				0x67, 0x68, 0x69, 0x6a, 0x68, 0x69, 0x6a, 0x6b,
				0x69, 0x6a, 0x6b, 0x6c, 0x6a, 0x6b, 0x6c, 0x6d,
				0x6b, 0x6c, 0x6d, 0x6e, 0x6c, 0x6d, 0x6e, 0x6f,
				0x6d, 0x6e, 0x6f, 0x70, 0x6e, 0x6f, 0x70, 0x71},
		.digest_length = SHA1_DIGEST_LEN,
		.digest = { 0x84, 0x98, 0x3E, 0x44, 0x1C, 0x3B, 0xD2, 0x6E,
			    0xBA, 0xAE, 0x4A, 0xA1, 0xF9, 0x51, 0x29, 0xE5,
			    0xE5, 0x46, 0x70, 0xF1},
	}
};

static crypto_test_reference_t sha224_reference[] = {
	{
		.length = 3,
		.plaintext = { 0x61, 0x62, 0x63 },
		.ciphertext = { 0x61, 0x62, 0x63 },
		.digest_length = SHA224_DIGEST_LEN,
		.digest = { 0x23, 0x09, 0x7d, 0x22, 0x34, 0x05, 0xd8, 0x22,
			    0x86, 0x42, 0xa4, 0x77, 0xbd, 0xa2, 0x55, 0xb3,
			    0x2a, 0xad, 0xbc, 0xe4, 0xbd, 0xa0, 0xb3, 0xf7,
			    0xe3, 0x6c, 0x9d, 0xa7 },
	},
	{
		.length = 56,
		.plaintext = { 0x61, 0x62, 0x63, 0x64, 0x62, 0x63, 0x64, 0x65,
			       0x63, 0x64, 0x65, 0x66, 0x64, 0x65, 0x66, 0x67,
			       0x65, 0x66, 0x67, 0x68, 0x66, 0x67, 0x68, 0x69,
			       0x67, 0x68, 0x69, 0x6a, 0x68, 0x69, 0x6a, 0x6b,
			       0x69, 0x6a, 0x6b, 0x6c, 0x6a, 0x6b, 0x6c, 0x6d,
			       0x6b, 0x6c, 0x6d, 0x6e, 0x6c, 0x6d, 0x6e, 0x6f,
			       0x6d, 0x6e, 0x6f, 0x70, 0x6e, 0x6f, 0x70, 0x71},
		.ciphertext = { 0x61, 0x62, 0x63, 0x64, 0x62, 0x63, 0x64, 0x65,
				0x63, 0x64, 0x65, 0x66, 0x64, 0x65, 0x66, 0x67,
				0x65, 0x66, 0x67, 0x68, 0x66, 0x67, 0x68, 0x69,
				0x67, 0x68, 0x69, 0x6a, 0x68, 0x69, 0x6a, 0x6b,
				0x69, 0x6a, 0x6b, 0x6c, 0x6a, 0x6b, 0x6c, 0x6d,
				0x6b, 0x6c, 0x6d, 0x6e, 0x6c, 0x6d, 0x6e, 0x6f,
				0x6d, 0x6e, 0x6f, 0x70, 0x6e, 0x6f, 0x70, 0x71},
		.digest_length = SHA224_DIGEST_LEN,
		.digest = { 0x75, 0x38, 0x8b, 0x16, 0x51, 0x27, 0x76, 0xcc,
			    0x5d, 0xba, 0x5d, 0xa1, 0xfd, 0x89, 0x01, 0x50,
			    0xb0, 0xc6, 0x45, 0x5c, 0xb4, 0xf5, 0x8b, 0x19,
			    0x52, 0x52, 0x25, 0x25},
	}
};

static crypto_test_reference_t sha256_reference[] = {
	{
		.length = 3,
		.plaintext = { 0x61, 0x62, 0x63 },
		.ciphertext = { 0x61, 0x62, 0x63 },
		.digest_length = SHA256_DIGEST_LEN,
		.digest = { 0xba, 0x78, 0x16, 0xbf, 0x8f, 0x01, 0xcf, 0xea,
			    0x41, 0x41, 0x40, 0xde, 0x5d, 0xae, 0x22, 0x23,
			    0xb0, 0x03, 0x61, 0xa3, 0x96, 0x17, 0x7a, 0x9c,
			    0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, 0x15, 0xad},
	},
	{
		.length = 56,
		.plaintext = { 0x61, 0x62, 0x63, 0x64, 0x62, 0x63, 0x64, 0x65,
			       0x63, 0x64, 0x65, 0x66, 0x64, 0x65, 0x66, 0x67,
			       0x65, 0x66, 0x67, 0x68, 0x66, 0x67, 0x68, 0x69,
			       0x67, 0x68, 0x69, 0x6a, 0x68, 0x69, 0x6a, 0x6b,
			       0x69, 0x6a, 0x6b, 0x6c, 0x6a, 0x6b, 0x6c, 0x6d,
			       0x6b, 0x6c, 0x6d, 0x6e, 0x6c, 0x6d, 0x6e, 0x6f,
			       0x6d, 0x6e, 0x6f, 0x70, 0x6e, 0x6f, 0x70, 0x71},
		.ciphertext = { 0x61, 0x62, 0x63, 0x64, 0x62, 0x63, 0x64, 0x65,
				0x63, 0x64, 0x65, 0x66, 0x64, 0x65, 0x66, 0x67,
				0x65, 0x66, 0x67, 0x68, 0x66, 0x67, 0x68, 0x69,
				0x67, 0x68, 0x69, 0x6a, 0x68, 0x69, 0x6a, 0x6b,
				0x69, 0x6a, 0x6b, 0x6c, 0x6a, 0x6b, 0x6c, 0x6d,
				0x6b, 0x6c, 0x6d, 0x6e, 0x6c, 0x6d, 0x6e, 0x6f,
				0x6d, 0x6e, 0x6f, 0x70, 0x6e, 0x6f, 0x70, 0x71},
		.digest_length = SHA256_DIGEST_LEN,
		.digest = { 0x24, 0x8d, 0x6a, 0x61, 0xd2, 0x06, 0x38, 0xb8,
			    0xe5, 0xc0, 0x26, 0x93, 0x0c, 0x3e, 0x60, 0x39,
			    0xa3, 0x3c, 0xe4, 0x59, 0x64, 0xff, 0x21, 0x67,
			    0xf6, 0xec, 0xed, 0xd4, 0x19, 0xdb, 0x06, 0xc1},
	}
};

static crypto_test_reference_t sha384_reference[] = {
	{
		.length = 3,
		.plaintext = { 0x61, 0x62, 0x63 },
		.ciphertext = { 0x61, 0x62, 0x63 },
		.digest_length = SHA384_DIGEST_LEN,
		.digest = { 0xcb, 0x00, 0x75, 0x3f, 0x45, 0xa3, 0x5e, 0x8b,
			    0xb5, 0xa0, 0x3d, 0x69, 0x9a, 0xc6, 0x50, 0x07,
			    0x27, 0x2c, 0x32, 0xab, 0x0e, 0xde, 0xd1, 0x63,
			    0x1a, 0x8b, 0x60, 0x5a, 0x43, 0xff, 0x5b, 0xed,
			    0x80, 0x86, 0x07, 0x2b, 0xa1, 0xe7, 0xcc, 0x23,
			    0x58, 0xba, 0xec, 0xa1, 0x34, 0xc8, 0x25, 0xa7},
	},
	{
		.length = 112,
		.plaintext = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
			       0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
			       0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a,
			       0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b,
			       0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c,
			       0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d,
			       0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e,
			       0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
			       0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
			       0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71,
			       0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72,
			       0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73,
			       0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74,
			       0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75},
		.ciphertext = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
				0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
				0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a,
				0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b,
				0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c,
				0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d,
				0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e,
				0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
				0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
				0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71,
				0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72,
				0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73,
				0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74,
				0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75},
		.digest_length = SHA384_DIGEST_LEN,
		.digest = { 0x09, 0x33, 0x0c, 0x33, 0xf7, 0x11, 0x47, 0xe8,
			    0x3d, 0x19, 0x2f, 0xc7, 0x82, 0xcd, 0x1b, 0x47,
			    0x53, 0x11, 0x1b, 0x17, 0x3b, 0x3b, 0x05, 0xd2,
			    0x2f, 0xa0, 0x80, 0x86, 0xe3, 0xb0, 0xf7, 0x12,
			    0xfc, 0xc7, 0xc7, 0x1a, 0x55, 0x7e, 0x2d, 0xb9,
			    0x66, 0xc3, 0xe9, 0xfa, 0x91, 0x74, 0x60, 0x39},
	}
};

static crypto_test_reference_t sha512_reference[] = {
	{
		.length = 3,
		.plaintext = { 0x61, 0x62, 0x63 },
		.ciphertext = { 0x61, 0x62, 0x63 },
		.digest_length = SHA512_DIGEST_LEN,
		.digest = { 0xdd, 0xaf, 0x35, 0xa1, 0x93, 0x61, 0x7a, 0xba,
			    0xcc, 0x41, 0x73, 0x49, 0xae, 0x20, 0x41, 0x31,
			    0x12, 0xe6, 0xfa, 0x4e, 0x89, 0xa9, 0x7e, 0xa2,
			    0x0a, 0x9e, 0xee, 0xe6, 0x4b, 0x55, 0xd3, 0x9a,
			    0x21, 0x92, 0x99, 0x2a, 0x27, 0x4f, 0xc1, 0xa8,
			    0x36, 0xba, 0x3c, 0x23, 0xa3, 0xfe, 0xeb, 0xbd,
			    0x45, 0x4d, 0x44, 0x23, 0x64, 0x3c, 0xe8, 0x0e,
			    0x2a, 0x9a, 0xc9, 0x4f, 0xa5, 0x4c, 0xa4, 0x9f},
	},
	{
		.length = 112,
		.plaintext = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
			       0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
			       0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a,
			       0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b,
			       0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c,
			       0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d,
			       0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e,
			       0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
			       0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
			       0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71,
			       0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72,
			       0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73,
			       0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74,
			       0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75},
		.ciphertext = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
				0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
				0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a,
				0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b,
				0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c,
				0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d,
				0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e,
				0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
				0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
				0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71,
				0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72,
				0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73,
				0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74,
				0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75},
		.digest_length = SHA512_DIGEST_LEN,
		.digest = { 0x8e, 0x95, 0x9b, 0x75, 0xda, 0xe3, 0x13, 0xda,
			    0x8c, 0xf4, 0xf7, 0x28, 0x14, 0xfc, 0x14, 0x3f,
			    0x8f, 0x77, 0x79, 0xc6, 0xeb, 0x9f, 0x7f, 0xa1,
			    0x72, 0x99, 0xae, 0xad, 0xb6, 0x88, 0x90, 0x18,
			    0x50, 0x1d, 0x28, 0x9e, 0x49, 0x00, 0xf7, 0xe4,
			    0x33, 0x1b, 0x99, 0xde, 0xc4, 0xb5, 0x43, 0x3a,
			    0xc7, 0xd3, 0x29, 0xee, 0xb6, 0xdd, 0x26, 0x54,
			    0x5e, 0x96, 0xe5, 0x5b, 0x87, 0x4b, 0xe9, 0x09},
	}
};

#endif
